mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 18:46:39 +02:00
Centralized Mark All as Read button
This commit is contained in:
@@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.DropdownMenu
|
||||
@@ -64,6 +65,7 @@ fun ChatroomListScreen(accountViewModel: AccountViewModel, navController: NavCon
|
||||
Column(
|
||||
modifier = Modifier.padding(vertical = 0.dp)
|
||||
) {
|
||||
Box(Modifier.fillMaxWidth()) {
|
||||
TabRow(
|
||||
backgroundColor = MaterialTheme.colors.background,
|
||||
selectedTabIndex = pagerState.currentPage,
|
||||
@@ -90,19 +92,12 @@ fun ChatroomListScreen(accountViewModel: AccountViewModel, navController: NavCon
|
||||
}
|
||||
)
|
||||
}
|
||||
HorizontalPager(count = 2, state = pagerState) {
|
||||
when (pagerState.currentPage) {
|
||||
0 -> TabKnown(accountViewModel, navController, markKnownAsRead,)
|
||||
1 -> TabNew(accountViewModel, navController, markNewAsRead)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IconButton(
|
||||
modifier = Modifier
|
||||
.padding(0.dp)
|
||||
.size(30.dp)
|
||||
.align(Alignment.TopEnd),
|
||||
.padding(end=5.dp)
|
||||
.size(40.dp)
|
||||
.align(Alignment.CenterEnd),
|
||||
onClick = { moreActionsExpanded = true }
|
||||
) {
|
||||
Icon(
|
||||
@@ -119,6 +114,16 @@ fun ChatroomListScreen(accountViewModel: AccountViewModel, navController: NavCon
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalPager(count = 2, state = pagerState) {
|
||||
when (pagerState.currentPage) {
|
||||
0 -> TabKnown(accountViewModel, navController, markKnownAsRead,)
|
||||
1 -> TabNew(accountViewModel, navController, markNewAsRead)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
Reference in New Issue
Block a user