Refactor: Introduce FullScreenContainedLoader and use rememberUpdatedState
This commit introduces `FullScreenContainedLoader` and replaces usages of `FullScreenLoader` where appropriate. It also updates several composables to use `rememberUpdatedState` for lambda parameters to ensure the latest versions are used. Additionally, the following changes are included: - Add a setting to show/hide the attachment button in the chat input bar. - Implement navigation to `PhotoViewScreen` when a photo attachment is clicked in a message. - Add "Copy link" and "Copy image" actions to `PhotoViewScreen`. - Remove unused settings and their corresponding logic from `SettingsViewModel` and `UserSettings`.
This commit is contained in:
+2
-3
@@ -44,7 +44,6 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
@@ -65,7 +64,7 @@ import dev.chrisbanes.haze.materials.HazeMaterials
|
||||
import dev.meloda.fast.conversations.model.ConversationsScreenState
|
||||
import dev.meloda.fast.conversations.navigation.ConversationsGraph
|
||||
import dev.meloda.fast.model.BaseError
|
||||
import dev.meloda.fast.ui.components.FullScreenLoader
|
||||
import dev.meloda.fast.ui.components.FullScreenContainedLoader
|
||||
import dev.meloda.fast.ui.components.NoItemsView
|
||||
import dev.meloda.fast.ui.components.VkErrorView
|
||||
import dev.meloda.fast.ui.model.api.ConversationOption
|
||||
@@ -306,7 +305,7 @@ fun ConversationsScreen(
|
||||
)
|
||||
}
|
||||
|
||||
screenState.isLoading && conversations.isEmpty() -> FullScreenLoader()
|
||||
screenState.isLoading && conversations.isEmpty() -> FullScreenContainedLoader()
|
||||
|
||||
else -> {
|
||||
val pullToRefreshState = rememberPullToRefreshState()
|
||||
|
||||
Reference in New Issue
Block a user