-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from Universite-Gustave-Eiffel/feature/setting…
…s-screen # Description Adds a settings screen to tweak persistent app settings ## Changes - Added a crossplaform user settings service to manage persistently stored settings using the [Settings Multiplatform](https://github.com/russhwolf/multiplatform-settings) library - Android settings are stored using `SharedPreferences` - iOS settings are stored using `NSUserDefaults` - Web settings are stored using `Storage` - Any serializable type can be stored, associated to a unique key and a default value - Settings values can be retrieved as a one time thing or as a `Flow<T>` to listen to value changes - Added a settings screen with a list of all settings - Bumped dependencies to latest versions ## Linked issues #44 ## Remaining TODOs UI could still be improved (especially on small phones and on web) but I'm saving this for later when we'll do a general UI/UX improvement work over the whole app to ensure style consistency. ## Checklist - [x] Code compiles correctly on all platforms - [x] All pre-existing tests are passing - [x] If needed, new tests have been added - [x] Extended the README / documentation if necessary - [x] Added code has been documented
- Loading branch information
Showing
60 changed files
with
1,593 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...src/androidMain/kotlin/org/noiseplanet/noisecapture/util/shadow/BlurMaskFilter.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.noiseplanet.noisecapture.util.shadow | ||
|
||
import android.graphics.BlurMaskFilter | ||
import androidx.compose.ui.graphics.NativePaint | ||
|
||
|
||
actual fun NativePaint.setBlurMaskFilter(blurRadius: Float) { | ||
this.maskFilter = BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.NORMAL) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") | ||
|
||
import org.junit.Ignore | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...seApp/src/commonMain/kotlin/org/noiseplanet/noisecapture/model/AcousticsKnowledgeLevel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.noiseplanet.noisecapture.model | ||
|
||
import kotlinx.serialization.Serializable | ||
import noisecapture.composeapp.generated.resources.Res | ||
import noisecapture.composeapp.generated.resources.acoustics_knowledge_beginner_description | ||
import noisecapture.composeapp.generated.resources.acoustics_knowledge_beginner_title | ||
import noisecapture.composeapp.generated.resources.acoustics_knowledge_confirmed_description | ||
import noisecapture.composeapp.generated.resources.acoustics_knowledge_confirmed_title | ||
import noisecapture.composeapp.generated.resources.acoustics_knowledge_expert_description | ||
import noisecapture.composeapp.generated.resources.acoustics_knowledge_expert_title | ||
import org.jetbrains.compose.resources.StringResource | ||
import org.noiseplanet.noisecapture.util.IterableEnum | ||
import org.noiseplanet.noisecapture.util.ShortNameRepresentable | ||
import kotlin.enums.EnumEntries | ||
|
||
@Serializable | ||
enum class AcousticsKnowledgeLevel : IterableEnum<AcousticsKnowledgeLevel>, ShortNameRepresentable { | ||
|
||
BEGINNER { | ||
|
||
override val fullName: StringResource = Res.string.acoustics_knowledge_beginner_description | ||
override val shortName: StringResource = Res.string.acoustics_knowledge_beginner_title | ||
}, | ||
|
||
CONFIRMED { | ||
|
||
override val fullName: StringResource = Res.string.acoustics_knowledge_confirmed_description | ||
override val shortName: StringResource = Res.string.acoustics_knowledge_confirmed_title | ||
}, | ||
|
||
EXPERT { | ||
|
||
override val fullName: StringResource = Res.string.acoustics_knowledge_expert_description | ||
override val shortName: StringResource = Res.string.acoustics_knowledge_expert_title | ||
}; | ||
|
||
override fun entries(): EnumEntries<AcousticsKnowledgeLevel> = entries | ||
} |
Oops, something went wrong.