mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-22 01:04:31 +01:00
Compose Updated, Dialog and Windows Exe Not working fix, Icons Added.
This commit is contained in:
parent
45ff63a8bf
commit
d4076be165
@ -22,9 +22,9 @@ import org.gradle.kotlin.dsl.accessors.runtime.addDependencyTo
|
|||||||
|
|
||||||
object Versions {
|
object Versions {
|
||||||
// App's Version (To be bumped at each update)
|
// App's Version (To be bumped at each update)
|
||||||
const val versionName = "3.3.0"
|
const val versionName = "3.3.1"
|
||||||
|
|
||||||
const val versionCode = 24
|
const val versionCode = 25
|
||||||
|
|
||||||
// Kotlin
|
// Kotlin
|
||||||
const val kotlinVersion = "1.5.21"
|
const val kotlinVersion = "1.5.21"
|
||||||
@ -122,7 +122,7 @@ object JetBrains {
|
|||||||
|
|
||||||
object Compose {
|
object Compose {
|
||||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||||
private const val VERSION = "1.0.0-alpha2"
|
private const val VERSION = "1.0.0-alpha3"
|
||||||
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
|
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
package com.shabinder.common.uikit.utils
|
package com.shabinder.common.uikit.utils
|
||||||
|
|
||||||
import android.util.Log
|
|
||||||
import androidx.compose.animation.core.TweenSpec
|
|
||||||
import androidx.compose.animation.core.animateFloatAsState
|
import androidx.compose.animation.core.animateFloatAsState
|
||||||
import androidx.compose.animation.core.tween
|
import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
@ -26,7 +24,6 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.composed
|
import androidx.compose.ui.composed
|
||||||
import androidx.compose.ui.draw.alpha
|
|
||||||
import androidx.compose.ui.draw.drawBehind
|
import androidx.compose.ui.draw.drawBehind
|
||||||
import androidx.compose.ui.graphics.Brush
|
import androidx.compose.ui.graphics.Brush
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
@ -3,6 +3,9 @@ package com.shabinder.common.uikit
|
|||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.animation.ExperimentalAnimationApi
|
import androidx.compose.animation.ExperimentalAnimationApi
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.graphics.painter.BitmapPainter
|
||||||
|
import androidx.compose.ui.res.loadImageBitmap
|
||||||
|
import androidx.compose.ui.res.useResource
|
||||||
|
|
||||||
@OptIn(ExperimentalAnimationApi::class)
|
@OptIn(ExperimentalAnimationApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
@ -12,7 +15,11 @@ actual fun Dialog(
|
|||||||
content: @Composable () -> Unit
|
content: @Composable () -> Unit
|
||||||
) {
|
) {
|
||||||
AnimatedVisibility(isVisible) {
|
AnimatedVisibility(isVisible) {
|
||||||
androidx.compose.ui.window.Dialog(onDismiss) {
|
androidx.compose.ui.window.Dialog(
|
||||||
|
onDismiss,
|
||||||
|
title = "SpotiFlyer",
|
||||||
|
icon = BitmapPainter(useResource("drawable/spotiflyer.png", ::loadImageBitmap))
|
||||||
|
) {
|
||||||
content()
|
content()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,10 @@ interface FileManager {
|
|||||||
|
|
||||||
fun createDirectory(dirPath: String)
|
fun createDirectory(dirPath: String)
|
||||||
|
|
||||||
suspend fun cacheImage(image: Any, path: String) // in Android = ImageBitmap, Desktop = BufferedImage
|
suspend fun cacheImage(
|
||||||
|
image: Any,
|
||||||
|
path: String
|
||||||
|
) // in Android = ImageBitmap, Desktop = BufferedImage
|
||||||
|
|
||||||
suspend fun loadImage(url: String, reqWidth: Int = 150, reqHeight: Int = 150): Picture
|
suspend fun loadImage(url: String, reqWidth: Int = 150, reqHeight: Int = 150): Picture
|
||||||
|
|
||||||
@ -74,12 +77,14 @@ interface FileManager {
|
|||||||
* */
|
* */
|
||||||
fun FileManager.createDirectories() {
|
fun FileManager.createDirectories() {
|
||||||
try {
|
try {
|
||||||
|
if (defaultDir() != "null") {
|
||||||
createDirectory(defaultDir())
|
createDirectory(defaultDir())
|
||||||
createDirectory(imageCacheDir())
|
createDirectory(imageCacheDir())
|
||||||
createDirectory(defaultDir() + "Tracks/")
|
createDirectory(defaultDir() + "Tracks/")
|
||||||
createDirectory(defaultDir() + "Albums/")
|
createDirectory(defaultDir() + "Albums/")
|
||||||
createDirectory(defaultDir() + "Playlists/")
|
createDirectory(defaultDir() + "Playlists/")
|
||||||
createDirectory(defaultDir() + "YT_Downloads/")
|
createDirectory(defaultDir() + "YT_Downloads/")
|
||||||
|
}
|
||||||
} catch (ignored: Exception) { }
|
} catch (ignored: Exception) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +103,8 @@ fun FileManager.finalOutputDir(
|
|||||||
/*DIR Specific Operation End*/
|
/*DIR Specific Operation End*/
|
||||||
|
|
||||||
fun getNameURL(url: String): String {
|
fun getNameURL(url: String): String {
|
||||||
return url.substring(url.lastIndexOf('/', url.lastIndexOf('/') - 1) + 1, url.length).replace('/', '_')
|
return url.substring(url.lastIndexOf('/', url.lastIndexOf('/') - 1) + 1, url.length)
|
||||||
|
.replace('/', '_')
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun downloadFile(url: String): Flow<DownloadResult> {
|
suspend fun downloadFile(url: String): Flow<DownloadResult> {
|
||||||
|
@ -22,7 +22,7 @@ internal class DesktopAnalyticsManager(
|
|||||||
|
|
||||||
val config: Config = Config(COUNTLY_CONFIG.SERVER_URL, COUNTLY_CONFIG.APP_KEY).apply {
|
val config: Config = Config(COUNTLY_CONFIG.SERVER_URL, COUNTLY_CONFIG.APP_KEY).apply {
|
||||||
eventsBufferSize = 2
|
eventsBufferSize = 2
|
||||||
loggingLevel = LoggingLevel.DEBUG
|
loggingLevel = LoggingLevel.ERROR
|
||||||
setDeviceIdStrategy(DeviceIdStrategy.UUID)
|
setDeviceIdStrategy(DeviceIdStrategy.UUID)
|
||||||
enableFeatures(*featuresSet)
|
enableFeatures(*featuresSet)
|
||||||
setRequiresConsent(true)
|
setRequiresConsent(true)
|
||||||
|
@ -83,7 +83,7 @@ compose.desktop {
|
|||||||
iconFile.set(iconsRoot.resolve("spotiflyer.ico"))
|
iconFile.set(iconsRoot.resolve("spotiflyer.ico"))
|
||||||
// Wondering what the heck is this? See : https://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html
|
// Wondering what the heck is this? See : https://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html
|
||||||
// https://www.guidgen.com/
|
// https://www.guidgen.com/
|
||||||
upgradeUuid = "9f9e966b-7eef-42c7-a49c-5194b17fabd0"
|
upgradeUuid = "3c4caf0c-ae83-457e-85cc-f8e535fb58e2"
|
||||||
menuGroup = packageName
|
menuGroup = packageName
|
||||||
}
|
}
|
||||||
linux {
|
linux {
|
||||||
|
@ -20,10 +20,11 @@ import androidx.compose.material.Surface
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.awt.ComposeWindow
|
import androidx.compose.ui.awt.ComposeWindow
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.graphics.painter.BitmapPainter
|
||||||
|
import androidx.compose.ui.res.loadImageBitmap
|
||||||
|
import androidx.compose.ui.res.useResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.window.Window
|
import androidx.compose.ui.window.*
|
||||||
import androidx.compose.ui.window.application
|
|
||||||
import androidx.compose.ui.window.rememberWindowState
|
|
||||||
import com.arkivanov.decompose.ComponentContext
|
import com.arkivanov.decompose.ComponentContext
|
||||||
import com.arkivanov.decompose.DefaultComponentContext
|
import com.arkivanov.decompose.DefaultComponentContext
|
||||||
import com.arkivanov.decompose.ExperimentalDecomposeApi
|
import com.arkivanov.decompose.ExperimentalDecomposeApi
|
||||||
@ -44,6 +45,7 @@ import com.shabinder.common.models.Actions
|
|||||||
import com.shabinder.common.providers.FetchPlatformQueryResult
|
import com.shabinder.common.providers.FetchPlatformQueryResult
|
||||||
import com.shabinder.common.root.SpotiFlyerRoot
|
import com.shabinder.common.root.SpotiFlyerRoot
|
||||||
import com.shabinder.common.translations.Strings
|
import com.shabinder.common.translations.Strings
|
||||||
|
import com.shabinder.common.uikit.SpotiFlyerLogo
|
||||||
import com.shabinder.common.uikit.configurations.SpotiFlyerColors
|
import com.shabinder.common.uikit.configurations.SpotiFlyerColors
|
||||||
import com.shabinder.common.uikit.configurations.SpotiFlyerShapes
|
import com.shabinder.common.uikit.configurations.SpotiFlyerShapes
|
||||||
import com.shabinder.common.uikit.configurations.SpotiFlyerTypography
|
import com.shabinder.common.uikit.configurations.SpotiFlyerTypography
|
||||||
@ -65,20 +67,15 @@ private lateinit var appWindow: ComposeWindow
|
|||||||
|
|
||||||
@OptIn(ExperimentalDecomposeApi::class)
|
@OptIn(ExperimentalDecomposeApi::class)
|
||||||
fun main() {
|
fun main() {
|
||||||
|
|
||||||
val lifecycle = LifecycleRegistry()
|
val lifecycle = LifecycleRegistry()
|
||||||
val rootComponent = spotiFlyerRoot(DefaultComponentContext(lifecycle))
|
val rootComponent = spotiFlyerRoot(DefaultComponentContext(lifecycle))
|
||||||
|
val windowState = WindowState(size = WindowSize(450.dp, 800.dp))
|
||||||
application {
|
singleWindowApplication(
|
||||||
val windowState = rememberWindowState(width = 450.dp, height = 800.dp)
|
|
||||||
|
|
||||||
LifecycleController(lifecycle, windowState)
|
|
||||||
Window(
|
|
||||||
title = "SpotiFlyer",
|
title = "SpotiFlyer",
|
||||||
state = windowState,
|
state = windowState,
|
||||||
onCloseRequest = ::exitApplication
|
icon = BitmapPainter(useResource("drawable/spotiflyer.png", ::loadImageBitmap))
|
||||||
) {
|
) {
|
||||||
appWindow = window
|
LifecycleController(lifecycle, windowState)
|
||||||
Surface(
|
Surface(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
color = Color.Black,
|
color = Color.Black,
|
||||||
@ -102,7 +99,6 @@ fun main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Download Tracking for Desktop Apps for Now will be measured using `GitHub Releases`
|
// Download Tracking for Desktop Apps for Now will be measured using `GitHub Releases`
|
||||||
// https://tooomm.github.io/github-release-stats/?username=Shabinder&repository=SpotiFlyer
|
// https://tooomm.github.io/github-release-stats/?username=Shabinder&repository=SpotiFlyer
|
||||||
|
@ -14,34 +14,63 @@
|
|||||||
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<vector android:height="150dp" android:viewportHeight="512"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:viewportWidth="512" android:width="150dp"
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:width="108dp"
|
||||||
<path android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0">
|
android:height="108dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<group android:scaleX="0.10546875"
|
||||||
|
android:scaleY="0.10546875"
|
||||||
|
android:translateX="27"
|
||||||
|
android:translateY="27">
|
||||||
|
<path
|
||||||
|
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0">
|
||||||
<aapt:attr name="android:fillColor">
|
<aapt:attr name="android:fillColor">
|
||||||
<gradient android:endX="437.019" android:endY="74.981"
|
<gradient
|
||||||
android:startX="74.981" android:startY="437.019" android:type="linear">
|
android:startY="437.0193"
|
||||||
<item android:color="#FF736BFD" android:offset="0"/>
|
android:startX="74.9807"
|
||||||
<item android:color="#FFF54187" android:offset="1"/>
|
android:endY="74.9807"
|
||||||
|
android:endX="437.0193"
|
||||||
|
android:type="linear">
|
||||||
|
<item android:offset="0" android:color="#FF736BFD"/>
|
||||||
|
<item android:offset="1" android:color="#FFF54187"/>
|
||||||
</gradient>
|
</gradient>
|
||||||
</aapt:attr>
|
</aapt:attr>
|
||||||
</path>
|
</path>
|
||||||
<path android:fillColor="#FF000000" android:pathData="M377,356.7c-68.9,-45.4 -155.6,-56.4 -257.6,-32.7c-20.5,4.8 -13.6,35.8 7.3,31.2C290.7,317 351.6,386 368.2,386C384,386 390.2,365.4 377,356.7z"/>
|
<path
|
||||||
<path android:fillColor="#FF000000" android:pathData="M112.1,275.1C203.9,253.4 308.1,266 384,308c18.5,10.2 34,-17.8 15.5,-28c-82.7,-45.7 -195.6,-59.5 -294.7,-36C84.2,248.8 91.5,280 112.1,275.1L112.1,275.1z"/>
|
android:fillColor="#FF000000"
|
||||||
<path android:fillColor="#FF000000" android:pathData="M100,191.9c96.6,-29.6 232.2,-13.4 308.7,36.9c17.6,11.5 35.3,-15.1 17.6,-26.7c-84.9,-55.8 -229.2,-73.3 -335.6,-40.8C70.4,167.5 79.9,198.1 100,191.9L100,191.9z"/>
|
android:pathData="M377,356.7c-68.9,-45.4 -155.6,-56.4 -257.6,-32.7c-20.5,4.8 -13.6,35.8 7.3,31.2C290.7,317 351.6,386 368.2,386C384,386 390.2,365.4 377,356.7z"/>
|
||||||
<path android:pathData="M507.8,438.2c-1.6,97.2 -141.9,97.1 -143.5,0C365.9,341 506.2,341 507.8,438.2z">
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M112.1,275.1C203.9,253.4 308.1,266 384,308c18.5,10.2 34,-17.8 15.5,-28c-82.7,-45.7 -195.6,-59.5 -294.7,-36C84.2,248.8 91.5,280 112.1,275.1L112.1,275.1z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M100,191.9c96.6,-29.6 232.2,-13.4 308.7,36.9c17.6,11.5 35.3,-15.1 17.6,-26.7c-84.9,-55.8 -229.2,-73.3 -335.6,-40.8C70.4,167.5 79.9,198.1 100,191.9L100,191.9z"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M507.8,438.2c-1.6,97.2 -141.9,97.1 -143.5,0C365.9,341 506.2,341 507.8,438.2z">
|
||||||
<aapt:attr name="android:fillColor">
|
<aapt:attr name="android:fillColor">
|
||||||
<gradient android:endX="384.197" android:endY="490.009"
|
<gradient
|
||||||
android:startX="487.832" android:startY="386.374" android:type="linear">
|
android:startY="386.3741"
|
||||||
<item android:color="#FF736BFD" android:offset="0"/>
|
android:startX="487.8323"
|
||||||
<item android:color="#FFF54187" android:offset="1"/>
|
android:endY="490.009"
|
||||||
|
android:endX="384.1974"
|
||||||
|
android:type="linear">
|
||||||
|
<item android:offset="0" android:color="#FF736BFD"/>
|
||||||
|
<item android:offset="1" android:color="#FFF54187"/>
|
||||||
</gradient>
|
</gradient>
|
||||||
</aapt:attr>
|
</aapt:attr>
|
||||||
</path>
|
</path>
|
||||||
<path android:fillColor="#FF000000"
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
android:pathData="M486.8,456.8c-0.6,-2.4 -6.9,-1 -8.5,-1.4c11.5,-82 -82.4,-86.7 -87.1,-22.2c0.3,1.8 -1,6.7 2.2,6.6c0,0 8.6,0 8.6,0c3.1,0.1 2,-4.7 2.2,-6.6c0.1,-23.3 35,-23.3 35.2,0c0,0 0,6.9 0,6.9c-0.1,2.8 4.4,2.8 4.3,0c5,-35.2 -43.8,-40.1 -43.8,-4.7h-4.3c-1.6,-53.7 77.2,-55.9 78.4,-2.2c0,0 0,24.4 0,24.4c-0.1,2.9 3.8,2.1 5.6,2.2l-20.7,21l-20.7,-21c1.8,-0.1 5.6,0.7 5.6,-2.2c0,0 0,-8.8 0,-8.8c0,-2.8 -4.4,-2.8 -4.3,0c0,0 0,6.6 0,6.6c-2.2,0.2 -11.3,-1.3 -8,3.7c0,0 25.9,26.3 25.9,26.3c0.8,0.9 2.2,0.9 3.1,0C460.6,484.4 489.4,458.3 486.8,456.8z"
|
android:pathData="M486.8,456.8c-0.6,-2.4 -6.9,-1 -8.5,-1.4c11.5,-82 -82.4,-86.7 -87.1,-22.2c0.3,1.8 -1,6.7 2.2,6.6c0,0 8.6,0 8.6,0c3.1,0.1 2,-4.7 2.2,-6.6c0.1,-23.3 35,-23.3 35.2,0c0,0 0,6.9 0,6.9c-0.1,2.8 4.4,2.8 4.3,0c5,-35.2 -43.8,-40.1 -43.8,-4.7h-4.3c-1.6,-53.7 77.2,-55.9 78.4,-2.2c0,0 0,24.4 0,24.4c-0.1,2.9 3.8,2.1 5.6,2.2l-20.7,21l-20.7,-21c1.8,-0.1 5.6,0.7 5.6,-2.2c0,0 0,-8.8 0,-8.8c0,-2.8 -4.4,-2.8 -4.3,0c0,0 0,6.6 0,6.6c-2.2,0.2 -11.3,-1.3 -8,3.7c0,0 25.9,26.3 25.9,26.3c0.8,0.9 2.2,0.9 3.1,0C460.6,484.4 489.4,458.3 486.8,456.8z"
|
||||||
android:strokeColor="#000" android:strokeWidth=".75"/>
|
android:strokeWidth="0.75"
|
||||||
<path android:fillColor="#00000000"
|
android:strokeColor="#000000"/>
|
||||||
|
<path
|
||||||
android:pathData="M510,437.5c-1.7,96.2 -142.1,96.2 -143.8,0C367.9,341.3 508.4,341.3 510,437.5z"
|
android:pathData="M510,437.5c-1.7,96.2 -142.1,96.2 -143.8,0C367.9,341.3 508.4,341.3 510,437.5z"
|
||||||
android:strokeColor="#000" android:strokeWidth="6"/>
|
android:strokeWidth="6"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#000000"/>
|
||||||
|
</group>
|
||||||
</vector>
|
</vector>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
6
fastlane/metadata/android/en-US/changelogs/25.txt
Normal file
6
fastlane/metadata/android/en-US/changelogs/25.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
- File size less than 100 KB,
|
||||||
|
- Crash Fixes when App Went in Background
|
||||||
|
- Offloaded Many CPU Intensive tasks from Main Thread
|
||||||
|
- Notification Handling Improved, Now Exits Gracefully
|
||||||
|
- Some translations Added.
|
||||||
|
- ImageVectors Caching Implemented Expect some performance gain
|
Loading…
Reference in New Issue
Block a user