mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-15 01:35:38 +00:00
disable all intereactions when reloading ttl
This commit is contained in:
+1
-1
@@ -191,7 +191,7 @@ fun ChatInfoView(
|
||||
)
|
||||
|
||||
if (progressIndicator.value) {
|
||||
ProgressIndicator()
|
||||
ProgressIndicator(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -59,7 +59,6 @@ fun ModalData.GroupChatInfoView(chatModel: ChatModel, rhId: Long?, chatId: Strin
|
||||
val sendReceipts = remember { mutableStateOf(SendReceipts.fromBool(groupInfo.chatSettings.sendRcpts, currentUser.sendRcptsSmallGroups)) }
|
||||
val chatItemTTL = remember(groupInfo.id) { mutableStateOf(if (groupInfo.chatItemTTL != null) ChatItemTTL.fromSeconds(groupInfo.chatItemTTL) else null) }
|
||||
val progressIndicator = rememberSaveable(groupInfo.id) { mutableStateOf(false) }
|
||||
// TODO [ttl] disable all interactions while ttl is changing
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
GroupChatInfoLayout(
|
||||
@@ -143,7 +142,7 @@ fun ModalData.GroupChatInfoView(chatModel: ChatModel, rhId: Long?, chatId: Strin
|
||||
)
|
||||
|
||||
if (progressIndicator.value) {
|
||||
ProgressIndicator()
|
||||
ProgressIndicator(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,9 +1,8 @@
|
||||
package chat.simplex.common.views.chat.group
|
||||
|
||||
import SectionBottomSpacer
|
||||
import androidx.compose.foundation.*
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
@@ -199,9 +198,9 @@ private fun RoleSelectionRow(groupInfo: GroupInfo, selectedRole: MutableState<Gr
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ProgressIndicator() {
|
||||
fun ProgressIndicator(disableInteractions: Boolean = false) {
|
||||
Box(
|
||||
Modifier.fillMaxSize(),
|
||||
Modifier.fillMaxSize().then(if (disableInteractions) Modifier.clickable(enabled = false, onClick = {}) else Modifier),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
CircularProgressIndicator(
|
||||
|
||||
Reference in New Issue
Block a user