Skip to content

Commit 3a5cd74

Browse files
committed
Remove useless code
1 parent f574ba2 commit 3a5cd74

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

app/src/main/java/com/infomaniak/mail/ui/main/settings/SettingsFragment.kt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import com.infomaniak.lib.applock.Utils.isKeyguardSecure
2828
import com.infomaniak.lib.applock.Utils.silentlyReverseSwitch
2929
import com.infomaniak.lib.core.utils.openAppNotificationSettings
3030
import com.infomaniak.lib.core.utils.safeBinding
31-
import com.infomaniak.lib.core.utils.safeNavigate
3231
import com.infomaniak.lib.core.utils.showToast
3332
import com.infomaniak.mail.MatomoMail.toFloat
3433
import com.infomaniak.mail.MatomoMail.trackEvent
@@ -52,8 +51,6 @@ class SettingsFragment : Fragment() {
5251
private var binding: FragmentSettingsBinding by safeBinding()
5352
private val mainViewModel: MainViewModel by activityViewModels()
5453

55-
private val currentClassName: String = SettingsFragment::class.java.name
56-
5754
@Inject
5855
lateinit var localSettings: LocalSettings
5956

@@ -71,7 +68,6 @@ class SettingsFragment : Fragment() {
7168
setSystemBarsColors()
7269

7370
setupMailboxesAdapter()
74-
setupAddMailbox()
7571
setupListeners()
7672
setSubtitlesInitialState()
7773
observeFeatureFlag()
@@ -97,15 +93,6 @@ class SettingsFragment : Fragment() {
9793
mainViewModel.mailboxesLive.observe(viewLifecycleOwner, mailboxesAdapter::setMailboxes)
9894
}
9995

100-
private fun setupAddMailbox() = with(binding) {
101-
addMailbox.setOnClickListener {
102-
safeNavigate(
103-
resId = R.id.attachMailboxFragment,
104-
currentClassName = currentClassName,
105-
)
106-
}
107-
}
108-
10996
private fun setSubtitlesInitialState() = with(binding) {
11097
with(localSettings) {
11198
settingsAiEngine.setSubtitle(aiEngine.localisedNameRes)
@@ -123,6 +110,7 @@ class SettingsFragment : Fragment() {
123110
}
124111

125112
private fun setupListeners() = with(binding) {
113+
addMailbox.setOnClickListener { animatedNavigation(resId = R.id.attachMailboxFragment) }
126114

127115
settingsNotifications.setOnClickListener {
128116
trackEvent("settingsNotifications", "openNotificationSettings")

app/src/main/res/layout/bottom_sheet_account.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
tools:title="My Account">
2525

2626
<!--
27-
We use useDefaultLayout to true, which embed recyclerViewAccount into a NestedScrollView. This
28-
This prevent elements of the RecyclerView to be recycled. It should not be a big problem
27+
We use useDefaultLayout to true, which embeds recyclerViewAccount into a NestedScrollView.
28+
This prevents elements of the RecyclerView to be recycled. It should not be a big problem
2929
since we shouldn't have a lot of items here but this can be improved.
3030
-->
3131

app/src/main/res/layout/fragment_attach_mailbox.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
android:layout_width="match_parent"
2222
android:layout_height="match_parent"
2323
app:title="@string/buttonAddEmailAddress"
24-
tools:context=".ui.main.user.AccountFragment">
24+
tools:context="com.infomaniak.mail.ui.main.user.AttachMailboxFragment">
2525

2626
<androidx.core.widget.NestedScrollView
2727
android:layout_width="match_parent"

0 commit comments

Comments
 (0)