Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class K9FeatureFlagFactory : FeatureFlagFactory {
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = false),
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class K9FeatureFlagFactory : FeatureFlagFactory {
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = false),
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = true),
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = true),
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = true),
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = true),
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = false),
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.drawerlayout.widget.DrawerLayout
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.update
import net.thunderbird.core.featureflag.FeatureFlagProvider
import net.thunderbird.core.ui.theme.api.FeatureThemeProvider
import net.thunderbird.feature.navigation.drawer.api.NavigationDrawer
import net.thunderbird.feature.navigation.drawer.api.R
Expand Down Expand Up @@ -37,8 +36,6 @@ class DropDownDrawer(
) : NavigationDrawer, KoinComponent {

private val themeProvider: FeatureThemeProvider by inject()
private val featureFlagProvider: FeatureFlagProvider by inject()

private val drawer: DrawerLayout = parent.findViewById(R.id.navigation_drawer_layout)
private val drawerContent: ComposeView = parent.findViewById(R.id.navigation_drawer_content)

Expand All @@ -65,7 +62,6 @@ class DropDownDrawer(
openManageFolders = openManageFolders,
openSettings = openSettings,
openAddAccount = openAddAccount,
featureFlagProvider = featureFlagProvider,
closeDrawer = { close() },
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ package net.thunderbird.feature.navigation.drawer.dropdown.ui

import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
import app.k9mail.core.ui.compose.common.mvi.observe
import net.thunderbird.core.featureflag.FeatureFlagKey
import net.thunderbird.core.featureflag.FeatureFlagProvider
import net.thunderbird.core.featureflag.FeatureFlagResult
import net.thunderbird.feature.navigation.drawer.dropdown.FolderDrawerState
import net.thunderbird.feature.navigation.drawer.dropdown.ui.DrawerContract.Effect
import net.thunderbird.feature.navigation.drawer.dropdown.ui.DrawerContract.Event
import net.thunderbird.feature.navigation.drawer.dropdown.ui.DrawerContract.ViewModel
import net.thunderbird.feature.navigation.drawer.siderail.ui.SideRailDrawerContent
import org.koin.androidx.compose.koinViewModel

@Suppress("LongParameterList")
Expand All @@ -25,7 +20,6 @@ internal fun DrawerView(
openSettings: () -> Unit,
openAddAccount: () -> Unit,
closeDrawer: () -> Unit,
featureFlagProvider: FeatureFlagProvider,
viewModel: ViewModel = koinViewModel<DrawerViewModel>(),
) {
val (state, dispatch) = viewModel.observe { effect ->
Expand All @@ -44,10 +38,6 @@ internal fun DrawerView(
}
}

val isDropdownDrawerEnabled = remember {
featureFlagProvider.provide(FeatureFlagKey("enable_dropdown_drawer_ui")) == FeatureFlagResult.Enabled
}

LaunchedEffect(drawerState.selectedAccountUuid) {
dispatch(Event.SelectAccount(drawerState.selectedAccountUuid))
}
Expand All @@ -56,15 +46,8 @@ internal fun DrawerView(
dispatch(Event.SelectFolder(drawerState.selectedFolderId))
}

if (isDropdownDrawerEnabled) {
DrawerContent(
state = state.value,
onEvent = { dispatch(it) },
)
} else {
SideRailDrawerContent(
state = state.value,
onEvent = { dispatch(it) },
)
}
DrawerContent(
state = state.value,
onEvent = { dispatch(it) },
)
}
Loading
Loading