-
Notifications
You must be signed in to change notification settings - Fork 2
new user preferences e.g. dark mode, language, currency #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👀 |
|
Thanks @andhikayuana . |
|
|
||
| if (BuildConfig.DEBUG) Timber.plant(DebugTree()) | ||
|
|
||
| // DEV: uncomment for debugging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
kcw-grunt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| fun find(code: String?): Language = entries.find { it.code == code } ?: ENGLISH | ||
| } | ||
|
|
||
| fun toLocale(): Locale { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice and neat @andhikayuana . Does this work for all cases? Does it work for xhants and Ru? We had issues in the past
| import com.brainwallet.data.model.Language | ||
| import java.util.Locale | ||
|
|
||
| @Deprecated(message = "migrate using SettingRepository for persistence the user preference") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add and FirebaseAnalytics metrics test point to track when we can remove completely @andhikayuana ?
pseudo public static final String _20250225_DULUP = "did_use_legacy_user_preference";
Bundle params = new Bundle();
params.putDouble("sync_time_elapsed", minutesValue);
params.putLong("sync_start_timestamp", startSync);
params.putLong("sync_last_timestamp", lastSync);
AnalyticsManager.logCustomEventWithParams(BRConstants._20250225_DULUP, params);
|
|
||
| setContent { | ||
| val appSetting by BrainwalletApp.module.settingRepository.settings.collectAsState( | ||
| val appSetting by BrainwalletApp.module!!.settingRepository.settings.collectAsState( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧑🎓 ✋ : What does this operator do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not-null assert: https://kotlinlang.org/docs/null-safety.html#not-null-assertion-operator
| import com.brainwallet.ui.theme.BrainwalletTheme | ||
|
|
||
| /** | ||
| * describe [FiatSelectorBottomSheet] for CurrencySelector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👨🎓 ✋ : Is there a shortcut to add the document comment @andhikayuana ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the content is manual, but for the comment related you can do
- Comment/uncomment with line comment: Command+/
- Comment/uncomment with block comment: Command+Shift+/
more: https://developer.android.com/studio/intro/keyboard-shortcuts
| import com.brainwallet.ui.theme.BrainwalletTheme | ||
|
|
||
| @Composable | ||
| fun LanguageSelectorBottomSheet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this up for launch!
Hope to add something like this @andhikayuana
https://medium.com/@nbtk123/create-your-own-horizontal-vertical-slider-picker-android-94b6ee32b3ff
But in vertical...like this:
| Ideal Picker |
|---|
![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah okay, noted!
|
@andhikayuana here is the logcat:
|
fixed at b774c16 |
…onConnectionChanged
kcw-grunt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM



Overview
Implement user preferences for dark mode, language and fiat currency
Internal Issue
Self Test