vk.com -> vk.ru

This commit is contained in:
2025-09-10 10:24:53 +03:00
parent 42ad04093d
commit db92b261c0
9 changed files with 17 additions and 25 deletions
@@ -18,7 +18,6 @@ import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
@@ -76,28 +75,20 @@ fun MainScreen(
}
BackHandler(enabled = selectedItemIndex != 1) {
val index = 1
val currentRoute = navigationItems[selectedItemIndex].route
selectedItemIndex = 1
navController.navigate(navigationItems[index].route) {
navController.navigate(navigationItems[selectedItemIndex].route) {
popUpTo(route = currentRoute) {
inclusive = true
}
}
}
val user = LocalUser.current
val profileImageUrl by remember(user) {
derivedStateOf { user?.photo100 }
}
val profileImageUrl = LocalUser.current?.photo100
var tabReselected by remember {
mutableStateOf(
navigationItems.associate {
it.route to false
}
)
mutableStateOf(navigationItems.associate { it.route to false })
}
Scaffold(
@@ -109,7 +100,7 @@ fun MainScreen(
if (theme.enableBlur) {
Modifier.hazeEffect(
state = hazeState,
style = HazeMaterials.thick()
style = HazeMaterials.regular(NavigationBarDefaults.containerColor)
)
} else Modifier
),
@@ -5,8 +5,8 @@ object AppConstants {
const val INSTALL_APP_MIME_TYPE = "application/vnd.android.package-archive"
const val API_VERSION = "5.238"
const val URL_OAUTH = "https://oauth.vk.com"
const val URL_API = "https://api.vk.com/method"
const val URL_OAUTH = "https://oauth.vk.ru"
const val URL_API = "https://api.vk.ru/method"
const val NOTIFICATION_CHANNEL_UNCATEGORIZED = "uncategorized"
const val NOTIFICATION_CHANNEL_LONG_POLLING = "long_polling"
@@ -27,6 +27,6 @@ data class VkStickerDomain(
backgroundImages.firstOrNull { it.width >= width }?.url
}
images != null -> images.firstOrNull { it.width >= width }?.url
else -> "https://vk.com/sticker/1-${id}-${width}b"
else -> "https://vk.ru/sticker/1-${id}-${width}b"
}
}
@@ -35,7 +35,7 @@ data class AuthDirectRequest(
}
data class AuthWithAppRequest(
val redirectUrl: String = "https://oauth.vk.com/blank.html",
val redirectUrl: String = "https://oauth.vk.ru/blank.html",
val display: String = "page",
val responseType: String = "token",
val accessToken: String,
@@ -50,6 +50,7 @@ import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner
import coil.compose.AsyncImage
import dev.meloda.fast.auth.captcha.CaptchaViewModel
import dev.meloda.fast.auth.captcha.CaptchaViewModelImpl
@@ -66,6 +67,7 @@ fun CaptchaRoute(
onResult: (String) -> Unit,
viewModel: CaptchaViewModel = koinViewModel<CaptchaViewModelImpl>()
) {
LocalViewModelStoreOwner.current
val screenState by viewModel.screenState.collectAsStateWithLifecycle()
val isNeedToOpenLogin by viewModel.isNeedToOpenLogin.collectAsStateWithLifecycle()
@@ -3,6 +3,7 @@ package dev.meloda.fast.auth.login.navigation
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner
import androidx.navigation.NavBackStackEntry
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
@@ -393,7 +393,7 @@ fun LoginScreen(
TextButton(
onClick = {
context.startActivity(
Intent(Intent.ACTION_VIEW, "https://vk.com/join".toUri())
Intent(Intent.ACTION_VIEW, "https://vk.ru/join".toUri())
)
}
) {
@@ -408,7 +408,7 @@ fun LoginScreen(
TextButton(
onClick = {
context.startActivity(
Intent(Intent.ACTION_VIEW, "https://vk.com/restore".toUri())
Intent(Intent.ACTION_VIEW, "https://vk.ru/restore".toUri())
)
}
) {
@@ -168,10 +168,8 @@ fun ConversationsScreen(
val toolbarContainerColor by animateColorAsState(
targetValue =
if (currentTheme.enableBlur || !listState.canScrollBackward)
MaterialTheme.colorScheme.surface
else
MaterialTheme.colorScheme.surfaceColorAtElevation(3.dp),
if (!listState.canScrollBackward) MaterialTheme.colorScheme.surface
else MaterialTheme.colorScheme.surfaceColorAtElevation(3.dp),
label = "toolbarColorAlpha",
animationSpec = tween(durationMillis = 50)
)
@@ -266,7 +264,7 @@ fun ConversationsScreen(
if (currentTheme.enableBlur) {
Modifier.hazeEffect(
state = hazeState,
style = HazeMaterials.thick()
style = HazeMaterials.regular(toolbarContainerColor)
)
} else Modifier
)
@@ -107,7 +107,7 @@ fun SettingsScreen(
if (themeConfig.enableBlur) {
Modifier.hazeEffect(
state = hazeState,
style = HazeMaterials.thick()
style = HazeMaterials.regular()
)
} else {
Modifier