diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/SettingsCard.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/SettingsCard.kt index c31116d9..36ce3777 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/SettingsCard.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/SettingsCard.kt @@ -24,5 +24,5 @@ abstract class SettingsCard( protected abstract fun buildCard(): MaterialAboutCard protected abstract fun getItems(): List - protected abstract fun getItemsMore(): List + protected open fun getItemsMore(): List = listOf() } diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/cards/SettingsProfileCard.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/cards/SettingsProfileCard.kt index 5ac23e62..f88a0242 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/cards/SettingsProfileCard.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/cards/SettingsProfileCard.kt @@ -6,10 +6,8 @@ package pl.szczodrzynski.edziennik.ui.modules.settings.cards import android.content.Intent import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial -import eu.szkolny.font.SzkolnyFont import pl.szczodrzynski.edziennik.R import pl.szczodrzynski.edziennik.ui.dialogs.profile.ProfileConfigDialog -import pl.szczodrzynski.edziennik.ui.dialogs.profile.ProfileRemoveDialog import pl.szczodrzynski.edziennik.ui.modules.login.LoginActivity import pl.szczodrzynski.edziennik.ui.modules.settings.MaterialAboutProfileItem import pl.szczodrzynski.edziennik.ui.modules.settings.SettingsCard @@ -20,7 +18,7 @@ class SettingsProfileCard(util: SettingsUtil) : SettingsCard(util) { override fun buildCard() = util.createCard( null, items = getItems(), - itemsMore = getItemsMore() + itemsMore = listOf() ) private fun getProfileItem(): MaterialAboutProfileItem = util.createProfileItem( @@ -45,26 +43,6 @@ class SettingsProfileCard(util: SettingsUtil) : SettingsCard(util) { icon = CommunityMaterial.Icon.cmd_account_plus_outline ) { activity.startActivity(Intent(activity, LoginActivity::class.java)) - }, - - util.createActionItem( - text = R.string.settings_profile_remove_text, - subText = R.string.settings_profile_remove_subtext, - icon = SzkolnyFont.Icon.szf_delete_empty_outline - ) { - ProfileRemoveDialog(activity, app.profile.id, app.profile.name, false) - } - ) - - override fun getItemsMore() = listOf( - util.createPropertyItem( - text = R.string.settings_profile_sync_text, - subText = R.string.settings_profile_sync_subtext, - icon = CommunityMaterial.Icon.cmd_account_convert, - value = app.profile.syncEnabled, - ) { _, it -> - app.profile.syncEnabled = it - app.profileSave() } ) }