Rename const values

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-03-01 15:18:35 +01:00 committed by Alper Öztürk
parent 79cffa8d04
commit 6f79f63bcb
2 changed files with 9 additions and 9 deletions

View file

@ -53,9 +53,9 @@ class ComposeActivity : DrawerActivity() {
lateinit var binding: ActivityComposeBinding
companion object {
const val destinationKey = "destinationKey"
const val titleKey = "titleKey"
const val menuItemKey = "menuItemKey"
const val DESTINATION_KEY = "DESTINATION_KEY"
const val TITLE_KEY = "TITLE_KEY"
const val MENU_ITEM_KEY = "MENU_ITEM_KEY"
lateinit var schemeFlow: MutableStateFlow<ColorScheme>
}
@ -65,9 +65,9 @@ class ComposeActivity : DrawerActivity() {
binding = ActivityComposeBinding.inflate(layoutInflater)
setContentView(binding.root)
val destination = intent.getSerializableArgument(destinationKey, ComposeDestination::class.java)
val titleId = intent.getIntExtra(titleKey, R.string.empty)
val menuItemId = intent.getIntExtra(menuItemKey, R.id.nav_assistant)
val destination = intent.getSerializableArgument(DESTINATION_KEY, ComposeDestination::class.java)
val titleId = intent.getIntExtra(TITLE_KEY, R.string.empty)
val menuItemId = intent.getIntExtra(MENU_ITEM_KEY, R.id.nav_assistant)
setupToolbar()
updateActionBarTitleAndHomeButtonByString(getString(titleId))

View file

@ -559,9 +559,9 @@ public abstract class DrawerActivity extends ToolbarActivity
private void startComposeActivity(ComposeDestination destination, int titleId, int menuItemId) {
Intent composeActivity = new Intent(getApplicationContext(), ComposeActivity.class);
composeActivity.putExtra(ComposeActivity.destinationKey, destination);
composeActivity.putExtra(ComposeActivity.titleKey, titleId);
composeActivity.putExtra(ComposeActivity.menuItemKey, menuItemId);
composeActivity.putExtra(ComposeActivity.DESTINATION_KEY, destination);
composeActivity.putExtra(ComposeActivity.TITLE_KEY, titleId);
composeActivity.putExtra(ComposeActivity.MENU_ITEM_KEY, menuItemId);
startActivity(composeActivity);
}