forked from melod1n/fast-messenger
clean up settings and some other things
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.meloda.app.fast.messageshistory.model
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import com.meloda.app.fast.common.UiImage
|
||||
import com.meloda.app.fast.common.model.UiImage
|
||||
import com.meloda.app.fast.model.api.domain.VkAttachment
|
||||
|
||||
@Immutable
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.meloda.app.fast.messageshistory.model
|
||||
|
||||
import com.meloda.app.fast.common.UiImage
|
||||
import com.meloda.app.fast.common.model.UiImage
|
||||
|
||||
data class UiMessage(
|
||||
val id: Int,
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import androidx.navigation.NavController
|
||||
import androidx.navigation.NavGraphBuilder
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.toRoute
|
||||
import com.meloda.app.fast.common.customNavType
|
||||
import com.meloda.app.fast.common.extensions.customNavType
|
||||
import com.meloda.app.fast.messageshistory.model.MessagesHistoryArguments
|
||||
import com.meloda.app.fast.messageshistory.presentation.MessagesHistoryRoute
|
||||
import com.meloda.app.fast.model.BaseError
|
||||
|
||||
+4
-4
@@ -72,7 +72,7 @@ import com.meloda.app.fast.messageshistory.MessagesHistoryViewModelImpl
|
||||
import com.meloda.app.fast.messageshistory.model.ActionMode
|
||||
import com.meloda.app.fast.messageshistory.model.MessagesHistoryScreenState
|
||||
import com.meloda.app.fast.model.BaseError
|
||||
import com.meloda.app.fast.ui.theme.LocalTheme
|
||||
import com.meloda.app.fast.ui.theme.LocalThemeConfig
|
||||
import com.meloda.app.fast.ui.util.ImmutableList
|
||||
import dev.chrisbanes.haze.HazeState
|
||||
import dev.chrisbanes.haze.hazeChild
|
||||
@@ -131,7 +131,7 @@ fun MessagesHistoryScreen(
|
||||
val view = LocalView.current
|
||||
|
||||
val preferences: SharedPreferences = koinInject()
|
||||
val currentTheme = LocalTheme.current
|
||||
val currentTheme = LocalThemeConfig.current
|
||||
|
||||
val listState = rememberLazyListState()
|
||||
|
||||
@@ -178,7 +178,7 @@ fun MessagesHistoryScreen(
|
||||
TopAppBar(
|
||||
modifier = Modifier
|
||||
.then(
|
||||
if (currentTheme.usingBlur) {
|
||||
if (currentTheme.enableBlur) {
|
||||
Modifier.hazeChild(
|
||||
state = hazeSate,
|
||||
style = HazeMaterials.thick()
|
||||
@@ -203,7 +203,7 @@ fun MessagesHistoryScreen(
|
||||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors(
|
||||
containerColor = MaterialTheme.colorScheme.surface.copy(
|
||||
alpha = if (currentTheme.usingBlur) toolbarColorAlpha else 1f
|
||||
alpha = if (currentTheme.enableBlur) toolbarColorAlpha else 1f
|
||||
)
|
||||
),
|
||||
actions = {
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.meloda.app.fast.messageshistory.model.UiMessage
|
||||
import com.meloda.app.fast.ui.theme.LocalTheme
|
||||
import com.meloda.app.fast.ui.theme.LocalThemeConfig
|
||||
import com.meloda.app.fast.ui.util.ImmutableList
|
||||
import dev.chrisbanes.haze.HazeState
|
||||
import dev.chrisbanes.haze.haze
|
||||
@@ -35,13 +35,13 @@ fun MessagesList(
|
||||
enableAnimations: Boolean
|
||||
) {
|
||||
val messages = immutableMessages.toList()
|
||||
val currentTheme = LocalTheme.current
|
||||
val currentTheme = LocalThemeConfig.current
|
||||
|
||||
LazyColumn(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.then(
|
||||
if (currentTheme.usingBlur) {
|
||||
if (currentTheme.enableBlur) {
|
||||
Modifier.haze(
|
||||
state = hazeState,
|
||||
style = HazeMaterials.regular()
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
package com.meloda.app.fast.messageshistory.util
|
||||
|
||||
import android.content.res.Resources
|
||||
import com.meloda.app.fast.common.UiImage
|
||||
import com.meloda.app.fast.common.UiText
|
||||
import com.meloda.app.fast.common.model.UiImage
|
||||
import com.meloda.app.fast.common.model.UiText
|
||||
import com.meloda.app.fast.common.UserConfig
|
||||
import com.meloda.app.fast.common.extensions.orDots
|
||||
import com.meloda.app.fast.common.parseString
|
||||
import com.meloda.app.fast.common.model.parseString
|
||||
import com.meloda.app.fast.data.VkMemoryCache
|
||||
import com.meloda.app.fast.ui.R
|
||||
import com.meloda.app.fast.messageshistory.model.UiMessage
|
||||
|
||||
Reference in New Issue
Block a user