Closed ritwikshanker closed 3 years ago
Also, we already have strings in 4 languages so we can add an app language option for wider reach. But this will be in the second phase once our settings page is ready.
Hey! I would like to work on this, can you please assign this to me. Also, I'm thinking of using Jetpack Datastore to save user preferences, is that okay?
Hey! I would like to work on this, can you please assign this to me. Also, I'm thinking of using Jetpack Datastore to save user preferences, is that okay?
Sure @hardiksachan, Feel free to use the datastore.
dropdown/Dialogfragment
and save it in the data store according to user choice and I'll merge my code that will change the locale of the app. Okay @ritwikshanker, This is what I'll be working on.
Also, I have a question - I'll be creating enums to represent available countries and languages, right?
@hardiksachan
Alright, I'll save countries as a string. I'll raise a PR as soon as I'm done.
Hey @ritwikshanker, I have implemented datastore and a settings page from where the language, country, and theme can be updated.
But, I have not wired up the logic to actually observe the settings and update the app theme because currently there are two sources of truth for the theme - XML views, and compose theme.
Since, the complete app is being ported to Compose, can we do it after the migration is done? And should I raise a PR?
Current Progress -
PS: these values are saved in datastore.
Hey @ritwikshanker, I have implemented datastore and a settings page from where the language, country, and theme can be updated.
But, I have not wired up the logic to actually observe the settings and update the app theme because currently there are two sources of truth for the theme - XML views, and compose theme.
Since, the complete app is being ported to Compose, can we do it after the migration is done? And should I raise a PR?
EDIT:
Current Progress -
PS: these values are saved in datastore.
Yeah raise a PR. I have already done the theme thing in another app so i'll pick it up from here. Nothing to worry! ✌️
Okay @ritwikshanker, I have raised a PR, please take a look.
As of now, only changing theme's is the customization available to the user. We can also add his preferred country so that they don't have to always select their country from the dropdown. For that, we will need a separate screen so in future, if we want we can increase more customization options. In layman terms, we sort of have to build a settings page.