Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 06ab8fad authored by Wolf-Martell Montwé's avatar Wolf-Martell Montwé Committed by GitHub
Browse files

Merge pull request #9110 from thunderbird/revert-9082-fix-issue-9081

Revert "Fixes Navigation Drawer Email Folder Click Bug"
parents f107acf9 cb526884
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
@@ -24,7 +23,6 @@ import net.thunderbird.feature.navigation.drawer.dropdown.domain.entity.DisplayT
import net.thunderbird.feature.navigation.drawer.dropdown.domain.entity.DisplayUnifiedFolder
import net.thunderbird.feature.navigation.drawer.dropdown.domain.entity.DisplayUnifiedFolderType

@Suppress("LongMethod")
@Composable
internal fun FolderListItem(
    displayFolder: DisplayFolder,
@@ -52,17 +50,10 @@ internal fun FolderListItem(
            .fillMaxWidth()
            .animateContentSize(),
    ) {
        val hasExpandableItems = remember { treeFolder !== null && treeFolder.children.isNotEmpty() }
        NavigationDrawerItem(
            label = mapFolderName(displayFolder, folderNameFormatter, parentPrefix),
            selected = selected,
            onClick = {
                if (hasExpandableItems) {
                    isExpanded.value = !isExpanded.value
                } else {
                    onClick(displayFolder)
                }
            },
            onClick = { onClick(displayFolder) },
            modifier = Modifier.fillMaxWidth(),
            icon = {
                Icon(
@@ -74,7 +65,7 @@ internal fun FolderListItem(
                    unreadCount = unreadCount,
                    starredCount = starredCount,
                    showStarredCount = showStarredCount,
                    expandableState = if (hasExpandableItems) isExpanded else null,
                    expandableState = if (treeFolder !== null && treeFolder.children.isNotEmpty()) isExpanded else null,
                )
            },
        )