move strings in core/ui module

disable generating android resources everywhere except core/ui module
replace UiR with R
This commit is contained in:
2025-08-27 04:53:46 +03:00
parent 799ed820e3
commit 4677e484d9
37 changed files with 359 additions and 348 deletions
@@ -10,7 +10,7 @@ import dev.meloda.fast.presentation.MainScreen
import dev.meloda.fast.profile.navigation.Profile
import dev.meloda.fast.ui.util.ImmutableList
import kotlinx.serialization.Serializable
import dev.meloda.fast.ui.R as UiR
import dev.meloda.fast.ui.R
@Serializable
object MainGraph
@@ -28,21 +28,21 @@ fun NavGraphBuilder.mainScreen(
) {
val navigationItems = ImmutableList.of(
BottomNavigationItem(
titleResId = UiR.string.title_friends,
selectedIconResId = UiR.drawable.baseline_people_alt_24,
unselectedIconResId = UiR.drawable.outline_people_alt_24,
titleResId = R.string.title_friends,
selectedIconResId = R.drawable.baseline_people_alt_24,
unselectedIconResId = R.drawable.outline_people_alt_24,
route = Friends,
),
BottomNavigationItem(
titleResId = UiR.string.title_conversations,
selectedIconResId = UiR.drawable.baseline_chat_24,
unselectedIconResId = UiR.drawable.outline_chat_24,
titleResId = R.string.title_conversations,
selectedIconResId = R.drawable.baseline_chat_24,
unselectedIconResId = R.drawable.outline_chat_24,
route = ConversationsGraph
),
BottomNavigationItem(
titleResId = UiR.string.title_profile,
selectedIconResId = UiR.drawable.baseline_account_circle_24,
unselectedIconResId = UiR.drawable.outline_account_circle_24,
titleResId = R.string.title_profile,
selectedIconResId = R.drawable.baseline_account_circle_24,
unselectedIconResId = R.drawable.outline_account_circle_24,
route = Profile
)
)
@@ -52,7 +52,7 @@ import dev.meloda.fast.ui.theme.LocalUser
import dev.meloda.fast.ui.util.isNeedToEnableDarkMode
import org.koin.androidx.compose.koinViewModel
import org.koin.compose.koinInject
import dev.meloda.fast.ui.R as UiR
import dev.meloda.fast.ui.R
class MainActivity : AppCompatActivity() {
@@ -255,9 +255,9 @@ class MainActivity : AppCompatActivity() {
private fun createNotificationChannels() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val noCategoryName = getString(UiR.string.notification_channel_no_category_name)
val noCategoryName = getString(R.string.notification_channel_no_category_name)
val noCategoryDescriptionText =
getString(UiR.string.notification_channel_no_category_description)
getString(R.string.notification_channel_no_category_description)
val noCategoryChannel =
NotificationChannel(
AppConstants.NOTIFICATION_CHANNEL_UNCATEGORIZED,
@@ -267,9 +267,9 @@ class MainActivity : AppCompatActivity() {
description = noCategoryDescriptionText
}
val longPollName = getString(UiR.string.notification_channel_long_polling_service_name)
val longPollName = getString(R.string.notification_channel_long_polling_service_name)
val longPollDescriptionText =
getString(UiR.string.notification_channel_long_polling_service_description)
getString(R.string.notification_channel_long_polling_service_description)
val longPollChannel =
NotificationChannel(
AppConstants.NOTIFICATION_CHANNEL_LONG_POLLING,
@@ -6,7 +6,7 @@ import android.content.Context
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import dev.meloda.fast.common.AppConstants
import dev.meloda.fast.ui.R as UiR
import dev.meloda.fast.ui.R
object NotificationsUtils {
@@ -28,7 +28,7 @@ object NotificationsUtils {
actions: List<NotificationCompat.Action> = emptyList(),
): NotificationCompat.Builder {
val builder = NotificationCompat.Builder(context, channelId)
.setSmallIcon(UiR.drawable.ic_fast_logo)
.setSmallIcon(R.drawable.ic_fast_logo)
.setContentTitle(title)
.setPriority(priority.value)
.setContentIntent(contentIntent)