Skip to content

Commit

Permalink
fix: Migrate Settings from XML to compose openMF#2570
Browse files Browse the repository at this point in the history
    fix: Migrate Settings from XML to compose openMF#2570

fix: Migrate Settings from XML to compose openMF#2570

refactor: Migrate Settings from XML to compose openMF#2570
  • Loading branch information
itsPronay committed Jun 4, 2024
1 parent d46ab72 commit b8db829
Show file tree
Hide file tree
Showing 10 changed files with 673 additions and 209 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
android:name=".utils.fcm.RegistrationIntentService"
android:exported="false" />

<activity android:name=".ui.activities.SettingsActivity" />
<activity android:name="org.mifos.mobile.ui.settings.SettingsActivity" />
</application>

</manifest>
2 changes: 1 addition & 1 deletion app/src/main/java/org/mifos/mobile/MifosSelfServiceApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.raizlabs.android.dbflow.config.FlowConfig
import com.raizlabs.android.dbflow.config.FlowManager
import dagger.hilt.android.HiltAndroidApp
import org.mifos.mobile.api.local.PreferencesHelper
import org.mifos.mobile.ui.fragments.applySavedTheme
import org.mifos.mobile.ui.settings.applySavedTheme
import org.mifos.mobile.utils.LanguageHelper
import org.mifos.mobile.utils.LanguageHelper.onAttach
import java.util.Locale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import android.text.TextUtils
import dagger.hilt.android.qualifiers.ApplicationContext
import org.mifos.mobile.api.BaseURL
import org.mifos.mobile.api.SelfServiceInterceptor
import org.mifos.mobile.ui.fragments.AppTheme
import org.mifos.mobile.ui.settings.AppTheme
import javax.inject.Inject
import javax.inject.Singleton

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import org.mifos.mobile.ui.getThemeAttributeColor
import org.mifos.mobile.ui.help.HelpActivity
import org.mifos.mobile.ui.home.HomeOldFragment
import org.mifos.mobile.ui.login.LoginActivity
import org.mifos.mobile.ui.settings.SettingsActivity
import org.mifos.mobile.utils.Constants
import org.mifos.mobile.utils.TextDrawable
import org.mifos.mobile.utils.Toaster
Expand Down
197 changes: 0 additions & 197 deletions app/src/main/java/org/mifos/mobile/ui/fragments/SettingsFragment.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package org.mifos.mobile.ui.activities
package org.mifos.mobile.ui.settings

import android.content.Intent
import android.os.Bundle
import androidx.core.app.ActivityCompat
import org.mifos.mobile.R
import org.mifos.mobile.databinding.ActivitySettingsBinding
import org.mifos.mobile.databinding.ActivityUserProfileBinding
import org.mifos.mobile.ui.activities.HomeActivity
import org.mifos.mobile.ui.activities.base.BaseActivity
import org.mifos.mobile.ui.fragments.SettingsFragment
import org.mifos.mobile.utils.Constants

class SettingsActivity : BaseActivity() {
private lateinit var binding: ActivitySettingsBinding
private var hasSettingsChanged = false
private lateinit var binding: ActivityUserProfileBinding
var hasSettingsChanged = false

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivitySettingsBinding.inflate(layoutInflater)
binding = ActivityUserProfileBinding.inflate(layoutInflater)
setContentView(binding.root)
setToolbarTitle(getString(R.string.settings))
showBackButton()

replaceFragment(SettingsFragment.newInstance(), false, R.id.container)
if (intent.hasExtra(Constants.HAS_SETTINGS_CHANGED)) {
hasSettingsChanged = intent.getBooleanExtra(
Expand All @@ -27,6 +27,7 @@ class SettingsActivity : BaseActivity() {
}
}

@Deprecated("Deprecated in Java")
override fun onBackPressed() {
if (supportFragmentManager.backStackEntryCount == 0) {
super.onBackPressed()
Expand All @@ -38,4 +39,4 @@ class SettingsActivity : BaseActivity() {
supportFragmentManager.popBackStack()
}
}
}
}
Loading

0 comments on commit b8db829

Please sign in to comment.