Skip to content

Commit

Permalink
Fixed linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shamim-emon committed Feb 21, 2025
1 parent 5610be0 commit 8aac9bc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal fun FolderListPreview() {
selectedFolder = null,
folderListScrollSnapshot = FolderListScrollSnapshot(
scrollPosition = 0,
scrollOffset = 0
scrollOffset = 0,
),
onFolderClick = {},
showStarredCount = false,
Expand All @@ -38,7 +38,7 @@ internal fun FolderListPreviewSelected() {
selectedFolder = DISPLAY_FOLDER,
folderListScrollSnapshot = FolderListScrollSnapshot(
scrollPosition = 0,
scrollOffset = 0
scrollOffset = 0,
),
onFolderClick = {},
showStarredCount = false,
Expand All @@ -59,7 +59,7 @@ internal fun FolderListWithUnifiedFolderPreview() {
selectedFolder = DISPLAY_FOLDER,
folderListScrollSnapshot = FolderListScrollSnapshot(
scrollPosition = 0,
scrollOffset = 0
scrollOffset = 0,
),
onFolderClick = {},
showStarredCount = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import app.k9mail.feature.navigation.drawer.ui.setting.SettingList
// automatically limit the width of the content view so there's still room for a scrim with minimum tap width.
private val DRAWER_WIDTH = 360.dp

@Suppress("LongMethod")
@Composable
internal fun DrawerContent(
state: State,
Expand Down Expand Up @@ -72,7 +73,7 @@ internal fun DrawerContent(
},
onUpdateFolderListScrollPosition = { position, offset ->
onEvent(
Event.OnUpdateFolderListScrollPosition(position = position, offset = offset)
Event.OnUpdateFolderListScrollPosition(position = position, offset = offset),
)
},
showStarredCount = state.config.showStarredCount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal interface DrawerContract {
val selectedFolderId: String? = null,
val folderListScrollSnapshot: FolderListScrollSnapshot = FolderListScrollSnapshot(
scrollPosition = 0,
scrollOffset = 0
scrollOffset = 0,
),
val isLoading: Boolean = false,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ internal class DrawerViewModel(
it.copy(
folderListScrollSnapshot = FolderListScrollSnapshot(
scrollPosition = event.position,
scrollOffset = event.offset
)
scrollOffset = event.offset,
),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ internal fun FolderList(
LaunchedEffect(Unit) {
listState.scrollToItem(
index = folderListScrollSnapshot.scrollPosition,
scrollOffset = folderListScrollSnapshot.scrollOffset
scrollOffset = folderListScrollSnapshot.scrollOffset,
)
}

DisposableEffect(Unit) {
onDispose {
onUpdateFolderListScrollPosition(
listState.firstVisibleItemIndex,
listState.firstVisibleItemScrollOffset
listState.firstVisibleItemScrollOffset,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package app.k9mail.feature.navigation.drawer.ui.folder

data class FolderListScrollSnapshot(
val scrollPosition: Int,
val scrollOffset: Int
val scrollOffset: Int,
)

0 comments on commit 8aac9bc

Please sign in to comment.