~repos /only-bible-app
git clone https://pyrossh.dev/repos/only-bible-app.git
The only bible app you will ever need. No ads. No in-app purchases. No distractions.
399102dc
—
pyrossh 1 year ago
fix more issues
- composeApp/src/androidMain/kotlin/dev/pyrossh/only_bible_app/MainActivity.kt +1 -3
- composeApp/src/androidMain/kotlin/dev/pyrossh/only_bible_app/Platform.android.kt +0 -3
- composeApp/src/commonMain/kotlin/dev/pyrossh/only_bible_app/AppTheme.kt +0 -1
- composeApp/src/commonMain/kotlin/dev/pyrossh/only_bible_app/composables/TextSettingsBottomSheet.kt +0 -4
- composeApp/src/iosMain/kotlin/dev/pyrossh/only_bible_app/MainViewController.kt +1 -6
composeApp/src/androidMain/kotlin/dev/pyrossh/only_bible_app/MainActivity.kt
CHANGED
|
@@ -4,12 +4,10 @@ import android.os.Bundle
|
|
|
4
4
|
import androidx.activity.ComponentActivity
|
|
5
5
|
import androidx.activity.compose.setContent
|
|
6
6
|
import androidx.activity.enableEdgeToEdge
|
|
7
|
-
import androidx.activity.viewModels
|
|
8
7
|
import com.russhwolf.settings.SharedPreferencesSettings
|
|
9
8
|
|
|
10
9
|
class MainActivity : ComponentActivity() {
|
|
11
10
|
|
|
12
|
-
private val model by viewModels<AppViewModel>()
|
|
13
11
|
private val settings by lazy {
|
|
14
12
|
val prefs = applicationContext.getSharedPreferences("data", MODE_PRIVATE)
|
|
15
13
|
SharedPreferencesSettings(prefs)
|
|
@@ -20,7 +18,7 @@ class MainActivity : ComponentActivity() {
|
|
|
20
18
|
enableEdgeToEdge()
|
|
21
19
|
ShareKit.setActivityProvider { return@setActivityProvider this }
|
|
22
20
|
setContent {
|
|
23
|
-
App(
|
|
21
|
+
App(settings = settings)
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
24
|
}
|
composeApp/src/androidMain/kotlin/dev/pyrossh/only_bible_app/Platform.android.kt
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
package dev.pyrossh.only_bible_app
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
|
-
import android.app.Activity.RESULT_OK
|
|
5
4
|
import android.content.Intent
|
|
6
5
|
import android.view.SoundEffectConstants
|
|
7
6
|
import androidx.activity.ComponentActivity
|
|
8
7
|
import androidx.activity.SystemBarStyle
|
|
9
8
|
import androidx.activity.enableEdgeToEdge
|
|
10
9
|
import androidx.compose.foundation.isSystemInDarkTheme
|
|
11
|
-
import androidx.compose.material3.ColorScheme
|
|
12
10
|
import androidx.compose.runtime.Composable
|
|
13
11
|
import androidx.compose.runtime.LaunchedEffect
|
|
14
12
|
import androidx.compose.ui.graphics.toArgb
|
|
@@ -17,7 +15,6 @@ import androidx.compose.ui.platform.LocalContext
|
|
|
17
15
|
import androidx.compose.ui.platform.LocalView
|
|
18
16
|
import androidx.compose.ui.unit.Dp
|
|
19
17
|
import androidx.compose.ui.unit.dp
|
|
20
|
-
import dev.pyrossh.only_bible_app.domain.Verse
|
|
21
18
|
import com.microsoft.cognitiveservices.speech.SpeechConfig
|
|
22
19
|
import com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs
|
|
23
20
|
import com.microsoft.cognitiveservices.speech.SpeechSynthesizer
|
composeApp/src/commonMain/kotlin/dev/pyrossh/only_bible_app/AppTheme.kt
CHANGED
|
@@ -2,7 +2,6 @@ package dev.pyrossh.only_bible_app
|
|
|
2
2
|
import androidx.compose.foundation.isSystemInDarkTheme
|
|
3
3
|
import androidx.compose.material3.MaterialTheme
|
|
4
4
|
import androidx.compose.runtime.Composable
|
|
5
|
-
import androidx.compose.runtime.LaunchedEffect
|
|
6
5
|
import androidx.compose.ui.graphics.Color
|
|
7
6
|
import androidx.compose.ui.text.font.FontFamily
|
|
8
7
|
import androidx.compose.ui.text.font.GenericFontFamily
|
composeApp/src/commonMain/kotlin/dev/pyrossh/only_bible_app/composables/TextSettingsBottomSheet.kt
CHANGED
|
@@ -254,10 +254,6 @@ fun TextSettingsBottomSheet(
|
|
|
254
254
|
scope.launch {
|
|
255
255
|
onDismiss()
|
|
256
256
|
model.themeType = it
|
|
257
|
-
// android:configChanges="uiMode"
|
|
258
|
-
// min API 31
|
|
259
|
-
// val uiModeManager = context.getSystemService(UI_MODE_SERVICE) as UiModeManager
|
|
260
|
-
// uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_AUTO)
|
|
261
257
|
}
|
|
262
258
|
}
|
|
263
259
|
) {
|
composeApp/src/iosMain/kotlin/dev/pyrossh/only_bible_app/MainViewController.kt
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
package dev.pyrossh.only_bible_app
|
|
2
2
|
|
|
3
|
-
import androidx.compose.ui.uikit.ComposeUIViewControllerDelegate
|
|
4
3
|
import androidx.compose.ui.window.ComposeUIViewController
|
|
5
4
|
import com.russhwolf.settings.NSUserDefaultsSettings
|
|
6
|
-
import kotlinx.cinterop.ExperimentalForeignApi
|
|
7
|
-
import platform.Foundation.NSNotification
|
|
8
|
-
import platform.Foundation.NSNotificationCenter
|
|
9
5
|
|
|
10
6
|
val settings = NSUserDefaultsSettings.Factory().create()
|
|
11
|
-
val model = AppViewModel()
|
|
12
7
|
|
|
13
8
|
fun MainViewController() = ComposeUIViewController() {
|
|
14
|
-
App(
|
|
9
|
+
App(settings = settings)
|
|
15
10
|
}
|