diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 0b34fc59d..f1bdf1ae1 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -11,6 +11,8 @@ plugins { } kotlin { + explicitApi() + androidTarget { compilations.all { kotlinOptions { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/ContextExtensions.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/ContextExtensions.kt index 16d3cb7c3..56b220103 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/ContextExtensions.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/ContextExtensions.kt @@ -5,4 +5,4 @@ import androidx.datastore.core.DataStore import androidx.datastore.preferences.core.Preferences import androidx.datastore.preferences.preferencesDataStore -val Context.dataStore: DataStore by preferencesDataStore(name = "fr.outadoc.justchatting") +internal val Context.dataStore: DataStore by preferencesDataStore(name = "fr.outadoc.justchatting") diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/SharedPrefsPreferenceRepository.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/SharedPrefsPreferenceRepository.kt index 1f8850864..c0015aa27 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/SharedPrefsPreferenceRepository.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/SharedPrefsPreferenceRepository.kt @@ -11,7 +11,7 @@ import fr.outadoc.justchatting.component.preferences.data.AppUser import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map -class SharedPrefsPreferenceRepository( +internal class SharedPrefsPreferenceRepository( applicationContext: Context, ) : PreferenceRepository { diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/ChatModule.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/ChatModule.kt similarity index 93% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/ChatModule.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/ChatModule.kt index b0e9a1e20..c5face029 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/ChatModule.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/ChatModule.kt @@ -1,6 +1,5 @@ package fr.outadoc.justchatting.di -import fr.outadoc.justchatting.BuildConfig import fr.outadoc.justchatting.component.chatapi.common.handler.ChatCommandHandlerFactoriesProvider import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPluginsProvider import fr.outadoc.justchatting.component.twitch.websocket.irc.IrcMessageMapper @@ -37,14 +36,15 @@ import fr.outadoc.justchatting.feature.chat.presentation.FilterAutocompleteItems import fr.outadoc.justchatting.feature.chat.presentation.StreamAndUserInfoViewModel import fr.outadoc.justchatting.feature.chat.presentation.mobile.DefaultChatNotifier import fr.outadoc.justchatting.feature.chat.presentation.mobile.MobileCreateShortcutForChannelUseCase -import fr.outadoc.justchatting.feature.pronouns.data.AlejoPronounsClient import fr.outadoc.justchatting.feature.pronouns.data.AlejoPronounsApi +import fr.outadoc.justchatting.feature.pronouns.data.AlejoPronounsClient import fr.outadoc.justchatting.feature.pronouns.domain.PronounsApi import fr.outadoc.justchatting.feature.pronouns.domain.PronounsRepository import org.koin.androidx.viewmodel.dsl.viewModel +import org.koin.core.module.Module import org.koin.dsl.module -val chatModule = module { +public val chatModule: Module = module { viewModel { ChatViewModel(get(), get(), get(), get(), get(), get(), get(), get(), get()) } viewModel { StreamAndUserInfoViewModel(get()) } @@ -61,17 +61,11 @@ val chatModule = module { single { ChatCommandHandlerFactoriesProvider { - if (BuildConfig.ENABLE_MOCK_IRC_ENDPOINT) { - listOf( - get(), - ) - } else { - listOf( - get(), - get(), - get(), - ) - } + listOf( + get(), + get(), + get(), + ) } } diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/DbModule.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/DbModule.kt similarity index 93% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/DbModule.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/DbModule.kt index 766b8f44b..5d3ba8104 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/DbModule.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/DbModule.kt @@ -9,9 +9,10 @@ import fr.outadoc.justchatting.component.chatapi.db.RecentChannelQueries import fr.outadoc.justchatting.component.chatapi.db.RecentChannelsDao import fr.outadoc.justchatting.component.chatapi.db.RecentEmoteQueries import fr.outadoc.justchatting.component.chatapi.db.RecentEmotesDao +import org.koin.core.module.Module import org.koin.dsl.module -val dbModule = module { +public val dbModule: Module = module { single { AndroidSqliteDriver( diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/HomeModule.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/HomeModule.kt similarity index 87% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/HomeModule.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/HomeModule.kt index 20240e046..038cec585 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/HomeModule.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/HomeModule.kt @@ -4,9 +4,10 @@ import fr.outadoc.justchatting.feature.home.presentation.ChannelSearchViewModel import fr.outadoc.justchatting.feature.home.presentation.FollowedChannelsViewModel import fr.outadoc.justchatting.feature.home.presentation.FollowedStreamsViewModel import org.koin.androidx.viewmodel.dsl.viewModel +import org.koin.core.module.Module import org.koin.dsl.module -val homeModule = module { +public val homeModule: Module = module { viewModel { ChannelSearchViewModel(get()) } viewModel { FollowedChannelsViewModel(get()) } viewModel { FollowedStreamsViewModel(get()) } diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/KoinInitializer.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/KoinInitializer.kt similarity index 93% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/KoinInitializer.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/KoinInitializer.kt index 8bc9300f0..f60554900 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/KoinInitializer.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/KoinInitializer.kt @@ -9,7 +9,7 @@ import org.koin.core.KoinApplication import org.koin.core.context.startKoin @Suppress("unused") -class KoinInitializer : Initializer { +public class KoinInitializer : Initializer { override fun dependencies(): List>> = emptyList() diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainModule.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainModule.kt similarity index 94% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainModule.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainModule.kt index ae1207f51..f2b507de0 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainModule.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainModule.kt @@ -11,10 +11,11 @@ import fr.outadoc.justchatting.utils.http.AndroidHttpClientProvider import fr.outadoc.justchatting.utils.http.BaseHttpClientProvider import fr.outadoc.justchatting.utils.http.TwitchHttpClientProvider import kotlinx.datetime.Clock +import org.koin.core.module.Module import org.koin.core.qualifier.named import org.koin.dsl.module -val mainModule = module { +public val mainModule: Module = module { single { Clock.System } single { get().getSystemService()!! } single { AndroidNetworkStateObserver(get()) } diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainNavigationModule.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainNavigationModule.kt similarity index 75% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainNavigationModule.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainNavigationModule.kt index 62bde6b91..70e7f7864 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainNavigationModule.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/MainNavigationModule.kt @@ -2,8 +2,9 @@ package fr.outadoc.justchatting.di import fr.outadoc.justchatting.feature.home.presentation.MainRouterViewModel import org.koin.androidx.viewmodel.dsl.viewModel +import org.koin.core.module.Module import org.koin.dsl.module -val mainNavigationModule = module { +public val mainNavigationModule: Module = module { viewModel { MainRouterViewModel(get(), get(), get(), get()) } } diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/SettingsModule.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/SettingsModule.kt similarity index 92% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/SettingsModule.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/SettingsModule.kt index 64e05d708..a1b1a585f 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/SettingsModule.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/SettingsModule.kt @@ -8,9 +8,10 @@ import fr.outadoc.justchatting.feature.preferences.presentation.LogRepository import fr.outadoc.justchatting.feature.preferences.presentation.ReadExternalDependenciesList import fr.outadoc.justchatting.feature.preferences.presentation.SettingsViewModel import org.koin.androidx.viewmodel.dsl.viewModel +import org.koin.core.module.Module import org.koin.dsl.module -val settingsModule = module { +public val settingsModule: Module = module { viewModel { SettingsViewModel(get(), get(), get()) } single { AndroidLogRepository(get()) } single { DefaultReadExternalDependenciesList(get()) } diff --git a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/TwitchModule.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/TwitchModule.kt similarity index 96% rename from app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/TwitchModule.kt rename to shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/TwitchModule.kt index 23b69347f..e3c279a86 100644 --- a/app-android/src/androidMain/kotlin/fr/outadoc/justchatting/di/TwitchModule.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/di/TwitchModule.kt @@ -16,10 +16,11 @@ import fr.outadoc.justchatting.component.twitch.websocket.irc.recent.RecentMessa import fr.outadoc.justchatting.component.twitch.websocket.irc.recent.RecentMessagesServer import fr.outadoc.justchatting.utils.core.DefaultJson import kotlinx.serialization.json.Json +import org.koin.core.module.Module import org.koin.core.qualifier.named import org.koin.dsl.module -val twitchModule = module { +public val twitchModule: Module = module { single { DefaultJson } single { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserExt.kt index cef59ab38..dcb9d6b1c 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserExt.kt @@ -4,7 +4,7 @@ import android.content.Context import androidx.core.graphics.drawable.IconCompat import fr.outadoc.justchatting.component.chatapi.domain.model.User -fun User.getProfileImageIcon(context: Context): IconCompat = +internal fun User.getProfileImageIcon(context: Context): IconCompat = IconCompat.createWithContentUri( UserProfileImageContentProvider.createForUser(context, login).toString(), ) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserProfileImageContentProvider.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserProfileImageContentProvider.kt index 19302ff7a..5735c2d18 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserProfileImageContentProvider.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/data/UserProfileImageContentProvider.kt @@ -21,9 +21,9 @@ import org.koin.android.ext.android.inject import java.io.FileNotFoundException import java.io.FileOutputStream -class UserProfileImageContentProvider : ContentProvider() { +public class UserProfileImageContentProvider : ContentProvider() { - companion object { + internal companion object { private const val PATH_LOGIN = "login" diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatConnectionService.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatConnectionService.kt index 544aa27f3..aadb7e03f 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatConnectionService.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatConnectionService.kt @@ -10,7 +10,7 @@ import fr.outadoc.justchatting.feature.chat.domain.ChatRepository import fr.outadoc.justchatting.utils.logging.logInfo import org.koin.android.ext.android.inject -class ChatConnectionService : Service() { +internal class ChatConnectionService : Service() { companion object { private const val ACTION_REPLY = "reply" diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatNotifier.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatNotifier.kt index 9f063bf8c..1d6d8a5a4 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatNotifier.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatNotifier.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.feature.chat.presentation import android.content.Context import fr.outadoc.justchatting.component.chatapi.domain.model.User -interface ChatNotifier { +internal interface ChatNotifier { val areNotificationsEnabled: Boolean fun notify(context: Context, user: User) fun dismissNotification(context: Context, channelId: String) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CoilReducedAnimationTransformation.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CoilReducedAnimationTransformation.kt index 795cce839..30f154aa6 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CoilReducedAnimationTransformation.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CoilReducedAnimationTransformation.kt @@ -4,7 +4,7 @@ import android.graphics.Bitmap import coil.size.Size import coil.transform.Transformation -class CoilReducedAnimationTransformation : Transformation { +internal class CoilReducedAnimationTransformation : Transformation { override val cacheKey: String = "CoilReducedAnimationTransformation" override suspend fun transform(input: Bitmap, size: Size): Bitmap = input diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/BadgeItem.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/BadgeItem.kt index 308fb9bbf..4a2a5159e 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/BadgeItem.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/BadgeItem.kt @@ -12,7 +12,7 @@ import fr.outadoc.justchatting.feature.chat.presentation.getBestUrl import fr.outadoc.justchatting.utils.ui.isDark @Composable -fun BadgeItem( +internal fun BadgeItem( modifier: Modifier = Modifier, badge: TwitchBadge, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreen.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreen.kt index 153833f69..0d5eaff8c 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreen.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreen.kt @@ -23,7 +23,7 @@ import org.koin.androidx.compose.getViewModel import org.koin.compose.koinInject @Composable -fun ChannelChatScreen(channelLogin: String) { +internal fun ChannelChatScreen(channelLogin: String) { val viewModel: ChatViewModel = getViewModel() val state by viewModel.state.collectAsState() val inputState by viewModel.inputState.collectAsState() diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreenContent.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreenContent.kt index dc27a3f2b..fdf73acc5 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreenContent.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChannelChatScreenContent.kt @@ -28,7 +28,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.focus.focusRequester @@ -53,7 +52,7 @@ import fr.outadoc.justchatting.utils.ui.shortToast @ScreenPreviews @Composable -fun ChannelChatScreenLoadingPreview() { +internal fun ChannelChatScreenLoadingPreview() { AppTheme { ChannelChatScreenContent( state = ChatViewModel.State.Initial, @@ -64,9 +63,9 @@ fun ChannelChatScreenLoadingPreview() { } } -@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterial3Api::class) +@OptIn(ExperimentalMaterial3Api::class) @Composable -fun ChannelChatScreenContent( +internal fun ChannelChatScreenContent( modifier: Modifier = Modifier, state: ChatViewModel.State, inputState: ChatViewModel.InputState, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatActivity.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatActivity.kt index 1eace0856..8403f9744 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatActivity.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatActivity.kt @@ -12,9 +12,9 @@ import androidx.emoji2.text.DefaultEmojiCompatConfig import androidx.emoji2.text.EmojiCompat import fr.outadoc.justchatting.utils.ui.AppTheme -class ChatActivity : AppCompatActivity() { +public class ChatActivity : AppCompatActivity() { - companion object { + internal companion object { private const val CHANNEL_LOGIN = "channel_login" fun createIntent(context: Context, channelLogin: String): Intent { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoComplete.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoComplete.kt index e3b3eb0bd..577f2d7b4 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoComplete.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoComplete.kt @@ -26,7 +26,7 @@ import fr.outadoc.justchatting.utils.ui.AppTheme import fr.outadoc.justchatting.utils.ui.ThemePreviews @Composable -fun AutoCompleteEmoteItem( +internal fun AutoCompleteEmoteItem( modifier: Modifier = Modifier, onClick: () -> Unit, emote: Emote, @@ -41,7 +41,7 @@ fun AutoCompleteEmoteItem( } @Composable -fun AutoCompleteUserItem( +internal fun AutoCompleteUserItem( modifier: Modifier = Modifier, onClick: () -> Unit, chatter: Chatter, @@ -57,7 +57,7 @@ fun AutoCompleteUserItem( @ThemePreviews @Composable -fun AutoCompleteItemPreviewSimple() { +internal fun AutoCompleteItemPreviewSimple() { AppTheme { SuggestionChip( onClick = {}, @@ -70,7 +70,7 @@ fun AutoCompleteItemPreviewSimple() { @ThemePreviews @Composable -fun AutoCompleteItemPreviewIcon() { +internal fun AutoCompleteItemPreviewIcon() { AppTheme { SuggestionChip( onClick = {}, @@ -82,7 +82,7 @@ fun AutoCompleteItemPreviewIcon() { } @Composable -fun SuggestionChip( +internal fun SuggestionChip( modifier: Modifier = Modifier, onClick: () -> Unit, clickLabel: String, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoCompleteRow.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoCompleteRow.kt index d8cd87bce..537a8df50 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoCompleteRow.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatAutoCompleteRow.kt @@ -17,7 +17,7 @@ import fr.outadoc.justchatting.utils.ui.AppTheme @Preview @Composable -fun ChatAutoCompleteRowPreview() { +internal fun ChatAutoCompleteRowPreview() { AppTheme { val items = listOf( AutoCompleteItem.User( @@ -45,7 +45,7 @@ fun ChatAutoCompleteRowPreview() { } @Composable -fun ChatAutoCompleteRow( +internal fun ChatAutoCompleteRow( modifier: Modifier = Modifier, onChatterClick: (Chatter) -> Unit, onEmoteClick: (Emote) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatEvents.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatEvents.kt index d571706da..1828d78fc 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatEvents.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatEvents.kt @@ -37,7 +37,7 @@ import kotlinx.datetime.Instant import kotlin.time.Duration.Companion.minutes @Composable -fun ChatEvents( +internal fun ChatEvents( modifier: Modifier = Modifier, insets: PaddingValues, roomState: RoomState, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInlineTextContent.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInlineTextContent.kt index d36ffb06f..5b0bf761c 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInlineTextContent.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInlineTextContent.kt @@ -26,19 +26,19 @@ private val badgePlaceholder = Placeholder( placeholderVerticalAlign = PlaceholderVerticalAlign.TextCenter, ) -fun emoteTextContent(emote: Emote): InlineTextContent = +internal fun emoteTextContent(emote: Emote): InlineTextContent = InlineTextContent(emotePlaceholder) { EmoteItem( emote = emote, ) } -fun badgeTextContent(badge: TwitchBadge): InlineTextContent = +internal fun badgeTextContent(badge: TwitchBadge): InlineTextContent = InlineTextContent(badgePlaceholder) { BadgeItem(badge = badge) } -fun cheerEmoteTextContent(cheer: Emote): InlineTextContent { +internal fun cheerEmoteTextContent(cheer: Emote): InlineTextContent { val textWidthEm: Float = cheer.bitsValue?.let { it.formatNumber().length / 1.8f } ?: 0f return InlineTextContent( Placeholder( @@ -53,7 +53,7 @@ fun cheerEmoteTextContent(cheer: Emote): InlineTextContent { } } -fun previewTextContent(): InlineTextContent = +internal fun previewTextContent(): InlineTextContent = InlineTextContent(badgePlaceholder) { Icon(Icons.Default.Token, contentDescription = null) } diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInput.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInput.kt index c7ed495d8..730dcf55d 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInput.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatInput.kt @@ -53,7 +53,7 @@ import kotlinx.datetime.Instant @ThemePreviews @Composable -fun ChatInputPreviewBasic() { +internal fun ChatInputPreviewBasic() { AppTheme { ChatInput( message = TextFieldValue("Lorem ipsum KEKW"), @@ -63,7 +63,7 @@ fun ChatInputPreviewBasic() { @ThemePreviews @Composable -fun ChatInputPreviewLongMessage() { +internal fun ChatInputPreviewLongMessage() { AppTheme { ChatInput( message = TextFieldValue( @@ -75,7 +75,7 @@ fun ChatInputPreviewLongMessage() { @ThemePreviews @Composable -fun ChatInputPreviewEmpty() { +internal fun ChatInputPreviewEmpty() { AppTheme { ChatInput() } @@ -83,7 +83,7 @@ fun ChatInputPreviewEmpty() { @ThemePreviews @Composable -fun ChatInputPreviewReplying() { +internal fun ChatInputPreviewReplying() { AppTheme { ChatInput( replyingTo = ChatEvent.Message.Simple( @@ -103,7 +103,7 @@ fun ChatInputPreviewReplying() { } @Composable -fun ChatInput( +internal fun ChatInput( modifier: Modifier = Modifier, appUser: AppUser.LoggedIn? = null, message: TextFieldValue = TextFieldValue(), @@ -217,7 +217,7 @@ fun ChatInput( @OptIn(ExperimentalMaterial3Api::class) @Composable -fun ChatTextField( +internal fun ChatTextField( modifier: Modifier = Modifier, message: TextFieldValue, onMessageChange: (TextFieldValue) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatList.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatList.kt index 32db777df..4f43484dd 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatList.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatList.kt @@ -44,7 +44,7 @@ import kotlinx.datetime.Clock @OptIn(ExperimentalFoundationApi::class) @Composable -fun ChatList( +internal fun ChatList( modifier: Modifier = Modifier, entries: ImmutableList, emotes: ImmutableMap, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListContainer.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListContainer.kt index 109ce5b32..d56c7312a 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListContainer.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListContainer.kt @@ -33,7 +33,7 @@ import fr.outadoc.justchatting.utils.core.filterValuesNotNull import kotlinx.coroutines.launch @Composable -fun ChatListContainer( +internal fun ChatListContainer( modifier: Modifier = Modifier, state: ChatViewModel.State.Chatting, showTimestamps: Boolean, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListPlaceholder.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListPlaceholder.kt index 05c2cad3b..1e99adb3e 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListPlaceholder.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatListPlaceholder.kt @@ -24,7 +24,7 @@ import kotlin.random.Random @ThemePreviews @Composable -fun ChatListPlaceholderPreview() { +internal fun ChatListPlaceholderPreview() { AppTheme { Surface { ChatListPlaceholder() @@ -33,7 +33,7 @@ fun ChatListPlaceholderPreview() { } @Composable -fun ChatListPlaceholder( +internal fun ChatListPlaceholder( modifier: Modifier = Modifier, placeholderItemCount: Int = 100, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessage.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessage.kt index 652153245..89b824ed6 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessage.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessage.kt @@ -34,7 +34,7 @@ import kotlinx.collections.immutable.toPersistentHashMap @ThemePreviews @Composable -fun ChatMessagePreview( +internal fun ChatMessagePreview( @PreviewParameter(ChatMessagePreviewProvider::class) message: ChatEvent.Message, ) { val inlineBadges = previewBadges @@ -56,7 +56,7 @@ fun ChatMessagePreview( } @Composable -fun ChatMessage( +internal fun ChatMessage( modifier: Modifier = Modifier, message: ChatEvent.Message, inlineContent: ImmutableMap = persistentMapOf(), diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessageBody.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessageBody.kt index 25db96354..5f66472e0 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessageBody.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatMessageBody.kt @@ -49,7 +49,7 @@ import kotlinx.collections.immutable.toPersistentHashMap import kotlin.random.Random @Composable -fun ChatMessageBody( +internal fun ChatMessageBody( modifier: Modifier = Modifier, body: ChatEvent.Message.Body, inlineContent: ImmutableMap, @@ -155,7 +155,7 @@ fun ChatMessageBody( @Stable @Composable @OptIn(ExperimentalTextApi::class) -fun ChatEvent.Message.Body.toAnnotatedString( +internal fun ChatEvent.Message.Body.toAnnotatedString( appUser: AppUser.LoggedIn, inlineContent: ImmutableMap, pronouns: ImmutableMap, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatRichEmbed.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatRichEmbed.kt index ade1268a2..3e2504d29 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatRichEmbed.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatRichEmbed.kt @@ -29,7 +29,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews @OptIn(ExperimentalMaterial3Api::class) @Composable -fun ChatRichEmbed( +internal fun ChatRichEmbed( modifier: Modifier = Modifier, title: String, authorName: String, @@ -82,7 +82,7 @@ fun ChatRichEmbed( @ThemePreviews @Composable -fun ChatRichEmbedPreview() { +internal fun ChatRichEmbedPreview() { AppTheme { ChatRichEmbed( modifier = Modifier.width(640.dp), @@ -95,7 +95,7 @@ fun ChatRichEmbedPreview() { } @Composable -fun ChatRichEmbed( +internal fun ChatRichEmbed( modifier: Modifier = Modifier, richEmbed: ChatEvent.RichEmbed, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatScreen.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatScreen.kt index 59a41be61..e918b3e2d 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatScreen.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatScreen.kt @@ -9,7 +9,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.feature.chat.presentation.ChatViewModel @Composable -fun ChatScreen( +internal fun ChatScreen( modifier: Modifier = Modifier, state: ChatViewModel.State, showTimestamps: Boolean, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatSlowModeProgress.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatSlowModeProgress.kt index f41aaa541..7141c1a77 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatSlowModeProgress.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatSlowModeProgress.kt @@ -17,7 +17,7 @@ import kotlinx.datetime.Instant import kotlin.time.Duration @Composable -fun ChatSlowModeProgress( +internal fun ChatSlowModeProgress( modifier: Modifier, state: ChatViewModel.State, ) { @@ -38,7 +38,7 @@ fun ChatSlowModeProgress( } @Composable -fun ChatSlowModeProgress( +internal fun ChatSlowModeProgress( modifier: Modifier, constraint: MessagePostConstraint, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatTopAppBar.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatTopAppBar.kt index df367315c..7e032101a 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatTopAppBar.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/ChatTopAppBar.kt @@ -36,7 +36,7 @@ import org.koin.compose.koinInject @OptIn(ExperimentalMaterial3Api::class) @Composable -fun ChatTopAppBar( +internal fun ChatTopAppBar( modifier: Modifier = Modifier, channelLogin: String, user: User?, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/CheerEmoteItem.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/CheerEmoteItem.kt index 68e94c4f1..03151c8d3 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/CheerEmoteItem.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/CheerEmoteItem.kt @@ -16,7 +16,7 @@ import fr.outadoc.justchatting.utils.core.formatNumber import fr.outadoc.justchatting.utils.ui.parseHexColor @Composable -fun CheerEmoteItem( +internal fun CheerEmoteItem( modifier: Modifier = Modifier, emote: Emote, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DeeplinkExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DeeplinkExt.kt index 7a26656a9..7fc38d3ab 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DeeplinkExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DeeplinkExt.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.feature.chat.presentation.mobile import fr.outadoc.justchatting.component.deeplink.DeeplinkDefinitions -fun createChannelDeeplink(channelLogin: String): String = +internal fun createChannelDeeplink(channelLogin: String): String = DeeplinkDefinitions.ViewChannel .buildUpon() .appendPath(channelLogin) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DefaultChatNotifier.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DefaultChatNotifier.kt index b483f87bd..9e6ddd8ad 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DefaultChatNotifier.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DefaultChatNotifier.kt @@ -26,7 +26,7 @@ import fr.outadoc.justchatting.utils.ui.isLaunchedFromBubbleCompat import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking -class DefaultChatNotifier( +internal class DefaultChatNotifier( private val context: Context, private val preferenceRepository: PreferenceRepository, ) : ChatNotifier { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DynamicImageColorScheme.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DynamicImageColorScheme.kt index 3ff19cbf2..f2b4333f2 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DynamicImageColorScheme.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/DynamicImageColorScheme.kt @@ -26,7 +26,7 @@ import kotlinx.coroutines.suspendCancellableCoroutine @Stable @Composable -fun dynamicImageColorScheme( +internal fun dynamicImageColorScheme( url: String?, parentScheme: ColorScheme = MaterialTheme.colorScheme, ): ColorScheme { @@ -87,17 +87,17 @@ private fun Bitmap.getSourceColor(): Color { } @SuppressLint("RestrictedApi") -fun darkSchemeFromColor(color: Color): ColorScheme { +internal fun darkSchemeFromColor(color: Color): ColorScheme { return Scheme.dark(color.toArgb()).toComposeTheme() } @SuppressLint("RestrictedApi") -fun lightSchemeFromColor(color: Color): ColorScheme { +internal fun lightSchemeFromColor(color: Color): ColorScheme { return Scheme.light(color.toArgb()).toComposeTheme() } @SuppressLint("RestrictedApi") -fun Scheme.toComposeTheme(): ColorScheme { +internal fun Scheme.toComposeTheme(): ColorScheme { return ColorScheme( primary = Color(primary), onPrimary = Color(onPrimary), diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteGrid.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteGrid.kt index c4626a3dc..9b920ee8a 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteGrid.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteGrid.kt @@ -20,7 +20,7 @@ import fr.outadoc.justchatting.utils.ui.HapticIconButton import kotlinx.collections.immutable.ImmutableList @Composable -fun EmoteGrid( +internal fun EmoteGrid( modifier: Modifier = Modifier, emotes: ImmutableList, emoteSize: Dp = 36.dp, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteHeader.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteHeader.kt index 72f54ca35..021c522c7 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteHeader.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteHeader.kt @@ -17,7 +17,7 @@ import dev.icerock.moko.resources.compose.localized import fr.outadoc.justchatting.feature.chat.data.emotes.EmoteSetItem @Composable -fun EmoteHeader( +internal fun EmoteHeader( modifier: Modifier = Modifier, header: EmoteSetItem.Header, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteItem.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteItem.kt index 2836f9b0a..655a3db00 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteItem.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmoteItem.kt @@ -12,7 +12,7 @@ import fr.outadoc.justchatting.feature.chat.presentation.getBestUrl import fr.outadoc.justchatting.utils.ui.isDark @Composable -fun EmoteItem( +internal fun EmoteItem( modifier: Modifier = Modifier, emote: Emote, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmotePicker.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmotePicker.kt index 56e6c2525..2236455fc 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmotePicker.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/EmotePicker.kt @@ -17,7 +17,7 @@ import fr.outadoc.justchatting.feature.chat.presentation.ChatViewModel import kotlinx.collections.immutable.toImmutableList @Composable -fun EmotePicker( +internal fun EmotePicker( modifier: Modifier = Modifier, state: ChatViewModel.State, onEmoteClick: (Emote) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/HighlighedMessageCard.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/HighlighedMessageCard.kt index fc7934917..992d6585c 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/HighlighedMessageCard.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/HighlighedMessageCard.kt @@ -27,7 +27,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews import fr.outadoc.justchatting.utils.ui.isDark @Composable -fun HighlightedMessageCard( +internal fun HighlightedMessageCard( modifier: Modifier = Modifier, level: Level = Level.Base, content: @Composable () -> Unit, @@ -68,7 +68,7 @@ fun HighlightedMessageCard( @ThemePreviews @Composable -fun HighlightLevelPreview( +internal fun HighlightLevelPreview( @PreviewParameter(HighlightLevelPreviewProvider::class) level: Level, ) { AppTheme { @@ -86,7 +86,7 @@ fun HighlightLevelPreview( @Stable @Composable -fun singleSourceColorScheme( +internal fun singleSourceColorScheme( color: Color?, parentScheme: ColorScheme = MaterialTheme.colorScheme, ): ColorScheme { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/IconExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/IconExt.kt index dd703e271..217fa147a 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/IconExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/IconExt.kt @@ -18,7 +18,7 @@ import androidx.compose.material.icons.outlined.Star import androidx.compose.ui.graphics.vector.ImageVector import fr.outadoc.justchatting.component.chatapi.common.Icon -fun Icon.toMaterialIcon(): ImageVector = when (this) { +internal fun Icon.toMaterialIcon(): ImageVector = when (this) { Icon.Bolt -> Icons.Default.Bolt Icon.CallReceived -> Icons.Default.CallReceived Icon.Campaign -> Icons.Default.Campaign diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/InReplyToMessage.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/InReplyToMessage.kt index eabebd7bc..365ae8289 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/InReplyToMessage.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/InReplyToMessage.kt @@ -26,7 +26,7 @@ import fr.outadoc.justchatting.feature.chat.presentation.ChatPrefixConstants import fr.outadoc.justchatting.shared.MR @Composable -fun InReplyToMessage( +internal fun InReplyToMessage( modifier: Modifier = Modifier, mentions: List, message: String?, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MentionStyle.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MentionStyle.kt index 1806d4c74..8ef5779d9 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MentionStyle.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MentionStyle.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.feature.chat.presentation.mobile import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.SpanStyle -fun getMentionStyle( +internal fun getMentionStyle( mentioned: Boolean, mentionBackground: Color, mentionColor: Color, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MobileCreateShortcutForChannelUseCase.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MobileCreateShortcutForChannelUseCase.kt index ebcf8ba8f..2e0cad327 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MobileCreateShortcutForChannelUseCase.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/MobileCreateShortcutForChannelUseCase.kt @@ -8,9 +8,10 @@ import fr.outadoc.justchatting.component.chatapi.domain.model.User import fr.outadoc.justchatting.feature.chat.data.getProfileImageIcon import fr.outadoc.justchatting.feature.chat.presentation.CreateShortcutForChannelUseCase -class MobileCreateShortcutForChannelUseCase( +internal class MobileCreateShortcutForChannelUseCase( private val context: Context, ) : CreateShortcutForChannelUseCase { + override operator fun invoke(user: User) { val intent = ChatActivity.createIntent(context, user.login) val person: Person = diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/NoticeMessage.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/NoticeMessage.kt index 79eb6d1c5..33f4a3d5d 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/NoticeMessage.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/NoticeMessage.kt @@ -25,7 +25,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews @ThemePreviews @Composable -fun NoticeMessagePreview( +internal fun NoticeMessagePreview( @PreviewParameter(NoticeMessagePreviewProvider::class) message: ChatEvent.Message.Notice, ) { AppTheme { @@ -36,7 +36,7 @@ fun NoticeMessagePreview( } @Composable -fun NoticeMessage( +internal fun NoticeMessage( modifier: Modifier = Modifier, text: String, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/OnLifecycleEvent.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/OnLifecycleEvent.kt index be5061a66..456a008f7 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/OnLifecycleEvent.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/OnLifecycleEvent.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleEventObserver @Composable -fun OnLifecycleEvent(onEvent: (event: Lifecycle.Event) -> Unit) { +internal fun OnLifecycleEvent(onEvent: (event: Lifecycle.Event) -> Unit) { val eventHandler = rememberUpdatedState(onEvent) val lifecycleOwner = rememberUpdatedState(LocalLifecycleOwner.current) @@ -27,7 +27,7 @@ fun OnLifecycleEvent(onEvent: (event: Lifecycle.Event) -> Unit) { } @Composable -fun OnLifecycleEvent( +internal fun OnLifecycleEvent( onPause: () -> Unit = {}, onCreate: () -> Unit = {}, onStart: () -> Unit = {}, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PinnedMessageCard.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PinnedMessageCard.kt index d0a310900..12fba2594 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PinnedMessageCard.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PinnedMessageCard.kt @@ -40,7 +40,7 @@ import kotlinx.collections.immutable.persistentSetOf @OptIn(ExperimentalMaterial3Api::class) @Composable -fun PinnedMessageCard( +internal fun PinnedMessageCard( modifier: Modifier = Modifier, message: ChatEvent.Message, appUser: AppUser.LoggedIn, @@ -98,7 +98,7 @@ fun PinnedMessageCard( @ThemePreviews @Composable -fun PinnedMessageCardPreview( +internal fun PinnedMessageCardPreview( @PreviewParameter(ChatMessagePreviewProvider::class) message: ChatEvent.Message, ) { AppTheme { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollCard.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollCard.kt index c4371e2f2..89141ad45 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollCard.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollCard.kt @@ -35,7 +35,7 @@ import kotlin.time.Duration.Companion.seconds @OptIn(ExperimentalMaterial3Api::class) @Composable -fun PollCard( +internal fun PollCard( modifier: Modifier = Modifier, color: Color = MaterialTheme.colorScheme.secondaryContainer, poll: Poll, @@ -177,7 +177,7 @@ private val mockPoll = Poll( @ThemePreviews @Composable -fun PollCardPreview() { +internal fun PollCardPreview() { AppTheme { PollCard( poll = mockPoll.copy(status = Poll.Status.Active), @@ -187,7 +187,7 @@ fun PollCardPreview() { @ThemePreviews @Composable -fun PollCardPreviewCompleted() { +internal fun PollCardPreviewCompleted() { AppTheme { PollCard( poll = mockPoll.copy(status = Poll.Status.Completed), diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollChoice.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollChoice.kt index ce7d971f1..102f35097 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollChoice.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PollChoice.kt @@ -25,7 +25,7 @@ import fr.outadoc.justchatting.utils.core.formatPercent import fr.outadoc.justchatting.utils.ui.customColors @Composable -fun PollChoice( +internal fun PollChoice( modifier: Modifier = Modifier, title: String, votes: Int, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionCard.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionCard.kt index 5d2c92417..34dccd95b 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionCard.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionCard.kt @@ -43,7 +43,7 @@ import kotlin.time.Duration.Companion.minutes @OptIn(ExperimentalMaterial3Api::class) @Composable -fun PredictionCard( +internal fun PredictionCard( modifier: Modifier = Modifier, prediction: Prediction, color: Color = MaterialTheme.colorScheme.secondaryContainer, @@ -199,7 +199,7 @@ private val mockPrediction = Prediction( @ThemePreviews @Composable -fun PredictionCardPreview() { +internal fun PredictionCardPreview() { AppTheme { PredictionCard( prediction = mockPrediction.copy(status = Prediction.Status.Active), @@ -209,7 +209,7 @@ fun PredictionCardPreview() { @ThemePreviews @Composable -fun PredictionCardPreviewCompleted() { +internal fun PredictionCardPreviewCompleted() { AppTheme { PredictionCard( prediction = mockPrediction.copy(status = Prediction.Status.Resolved), diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionOutcome.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionOutcome.kt index d8b32b89f..cf925bdf3 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionOutcome.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/PredictionOutcome.kt @@ -27,7 +27,7 @@ import fr.outadoc.justchatting.utils.ui.AppTheme import fr.outadoc.justchatting.utils.ui.ThemePreviews @Composable -fun PredictionOutcome( +internal fun PredictionOutcome( modifier: Modifier = Modifier, title: String, votes: Int, @@ -85,7 +85,7 @@ fun PredictionOutcome( @ThemePreviews @Composable -fun PredictionOutcomePreview() { +internal fun PredictionOutcomePreview() { AppTheme { PredictionOutcome( title = "Antoine", @@ -99,7 +99,7 @@ fun PredictionOutcomePreview() { @ThemePreviews @Composable -fun PredictionOutcomePreviewWinning() { +internal fun PredictionOutcomePreviewWinning() { AppTheme { PredictionOutcome( modifier = Modifier.width(800.dp), diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidGoCard.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidGoCard.kt index 3a3377062..b0e1fa244 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidGoCard.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidGoCard.kt @@ -32,7 +32,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews @OptIn(ExperimentalMaterial3Api::class) @Composable -fun RaidGoCard( +internal fun RaidGoCard( modifier: Modifier = Modifier, raid: Raid.Go, color: Color = MaterialTheme.colorScheme.secondaryContainer, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidPrepareCard.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidPrepareCard.kt index bb250f6c4..fed27fe28 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidPrepareCard.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RaidPrepareCard.kt @@ -29,7 +29,7 @@ import fr.outadoc.justchatting.utils.ui.AppTheme import fr.outadoc.justchatting.utils.ui.ThemePreviews @Composable -fun RaidPrepareCard( +internal fun RaidPrepareCard( modifier: Modifier = Modifier, raid: Raid.Preparing, color: Color = MaterialTheme.colorScheme.secondaryContainer, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RedactModifier.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RedactModifier.kt index 0a173a601..f2f97ec29 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RedactModifier.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RedactModifier.kt @@ -17,7 +17,7 @@ import androidx.compose.ui.unit.dp * If [redact] is true, blurs the content this modifier is applied to. * When pressed, the contents will un-blur temporarily. */ -fun Modifier.redactable(redact: Boolean = true): Modifier = composed { +internal fun Modifier.redactable(redact: Boolean = true): Modifier = composed { var overrideRedaction: Boolean by remember { mutableStateOf(false) } val blurRadius by animateDpAsState( diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RemoteImage.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RemoteImage.kt index b65fb25ba..6736c7e3b 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RemoteImage.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RemoteImage.kt @@ -7,7 +7,7 @@ import coil.request.ImageRequest import fr.outadoc.justchatting.feature.chat.presentation.CoilReducedAnimationTransformation @Composable -fun remoteImageModel(url: String?): ImageRequest { +internal fun remoteImageModel(url: String?): ImageRequest { val context = LocalContext.current val systemAnimationScale: Float = diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RoomStateBanner.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RoomStateBanner.kt index 2d3c7011d..14779ed92 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RoomStateBanner.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/RoomStateBanner.kt @@ -11,7 +11,7 @@ import fr.outadoc.justchatting.utils.ui.format import kotlin.time.Duration @Composable -fun RoomStateBanner( +internal fun RoomStateBanner( modifier: Modifier = Modifier, roomState: RoomState, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SimpleMessage.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SimpleMessage.kt index ad8c015b7..f31db31e4 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SimpleMessage.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SimpleMessage.kt @@ -8,7 +8,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp @Composable -fun SimpleMessage( +internal fun SimpleMessage( modifier: Modifier = Modifier, data: @Composable () -> Unit, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SlimSnackbar.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SlimSnackbar.kt index c676ea3b6..ac15d8895 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SlimSnackbar.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SlimSnackbar.kt @@ -15,7 +15,7 @@ import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.dp @Composable -fun SlimSnackbar( +internal fun SlimSnackbar( modifier: Modifier = Modifier, color: Color = MaterialTheme.colorScheme.secondaryContainer, content: @Composable () -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfo.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfo.kt index 4da56d5ad..f2040bb4c 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfo.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfo.kt @@ -15,7 +15,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews import kotlinx.collections.immutable.persistentListOf @Composable -fun StreamAndUserInfo( +internal fun StreamAndUserInfo( modifier: Modifier = Modifier, user: User, stream: Stream?, @@ -43,7 +43,7 @@ fun StreamAndUserInfo( @ThemePreviews @Composable -fun StreamInfoPreviewFull() { +internal fun StreamInfoPreviewFull() { AppTheme { StreamAndUserInfo( user = User( @@ -72,7 +72,7 @@ fun StreamInfoPreviewFull() { @ThemePreviews @Composable -fun StreamInfoPreviewOffline() { +internal fun StreamInfoPreviewOffline() { AppTheme { StreamAndUserInfo( user = User( diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoScreen.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoScreen.kt index 7535098d3..533c1876f 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoScreen.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoScreen.kt @@ -9,7 +9,7 @@ import fr.outadoc.justchatting.feature.chat.presentation.StreamAndUserInfoViewMo import org.koin.androidx.compose.koinViewModel @Composable -fun StreamAndUserInfoScreen( +internal fun StreamAndUserInfoScreen( modifier: Modifier = Modifier, userLogin: String, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoState.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoState.kt index b29b6955f..60f579376 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoState.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamAndUserInfoState.kt @@ -15,7 +15,7 @@ import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.ui.ThemePreviews @Composable -fun StreamAndUserInfoState( +internal fun StreamAndUserInfoState( modifier: Modifier = Modifier, state: StreamAndUserInfoViewModel.State, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamInfo.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamInfo.kt index 4f450333a..189b571d5 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamInfo.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamInfo.kt @@ -27,7 +27,7 @@ import kotlinx.datetime.Instant @OptIn(ExperimentalLayoutApi::class) @Composable -fun StreamInfo( +internal fun StreamInfo( modifier: Modifier = Modifier, stream: Stream, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamTagChip.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamTagChip.kt index 40f8487e3..86b64d2be 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamTagChip.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/StreamTagChip.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.text.style.TextOverflow import fr.outadoc.justchatting.utils.ui.LabelChip @Composable -fun StreamTagChip( +internal fun StreamTagChip( tag: String, modifier: Modifier = Modifier, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SwipeToReply.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SwipeToReply.kt index 50fcb18d0..6e6b930ae 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SwipeToReply.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/SwipeToReply.kt @@ -26,7 +26,7 @@ import androidx.compose.ui.unit.dp @OptIn(ExperimentalMaterial3Api::class) @Composable -fun SwipeToReply( +internal fun SwipeToReply( modifier: Modifier = Modifier, enabled: Boolean, onDismiss: () -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TagList.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TagList.kt index d2cf3ba2b..5baa5ae18 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TagList.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TagList.kt @@ -12,7 +12,7 @@ import kotlinx.collections.immutable.ImmutableList @OptIn(ExperimentalLayoutApi::class) @Composable -fun TagList( +internal fun TagList( modifier: Modifier = Modifier, tags: ImmutableList, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TimedVisibility.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TimedVisibility.kt index afca3f177..6289693cf 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TimedVisibility.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/TimedVisibility.kt @@ -15,7 +15,7 @@ import kotlinx.coroutines.isActive import kotlin.time.Duration.Companion.seconds @Composable -fun IntervalCheckVisibility( +internal fun IntervalCheckVisibility( modifier: Modifier = Modifier, enter: EnterTransition, exit: ExitTransition, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UpdateTaskDescriptionForUser.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UpdateTaskDescriptionForUser.kt index a0d008d10..34fe6f07d 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UpdateTaskDescriptionForUser.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UpdateTaskDescriptionForUser.kt @@ -11,7 +11,7 @@ import coil.request.ImageRequest import fr.outadoc.justchatting.component.chatapi.domain.model.User @Composable -fun UpdateTaskDescriptionForUser(user: User?) { +internal fun UpdateTaskDescriptionForUser(user: User?) { val context = LocalContext.current as? Activity ?: return LaunchedEffect(user) { if (user != null) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserInfo.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserInfo.kt index 5cf26c56f..ec2cca52c 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserInfo.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserInfo.kt @@ -24,7 +24,7 @@ import fr.outadoc.justchatting.utils.ui.formatDate import kotlinx.datetime.Instant @Composable -fun UserInfo( +internal fun UserInfo( modifier: Modifier = Modifier, user: User, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserNoticeMessage.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserNoticeMessage.kt index 13a4d5781..07eba708a 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserNoticeMessage.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/UserNoticeMessage.kt @@ -27,7 +27,7 @@ import kotlinx.collections.immutable.toPersistentHashMap @ThemePreviews @Composable -fun UserNoticeMessagePreview( +internal fun UserNoticeMessagePreview( @PreviewParameter(ChatMessagePreviewProvider::class) message: ChatEvent.Message, ) { val inlineBadges = previewBadges @@ -49,7 +49,7 @@ fun UserNoticeMessagePreview( } @Composable -fun UserNoticeMessage( +internal fun UserNoticeMessage( modifier: Modifier = Modifier, title: String, titleIcon: ImageVector?, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/ChatPreviewProviders.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/ChatPreviewProviders.kt index 98e19f6d8..7b42a1248 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/ChatPreviewProviders.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/ChatPreviewProviders.kt @@ -8,7 +8,7 @@ import fr.outadoc.justchatting.component.chatapi.common.Icon import kotlinx.collections.immutable.persistentListOf import kotlinx.datetime.Instant -val previewBadges = listOf( +internal val previewBadges = listOf( "badge_subscriber_48", "badge_sub-gifter_100", ) @@ -154,7 +154,7 @@ private val noticeEntries = sequence { ) } -class ChatMessagePreviewProvider : PreviewParameterProvider { +internal class ChatMessagePreviewProvider : PreviewParameterProvider { override val values: Sequence = sequence { yieldAll(simpleEntries) yieldAll(noticeEntries) @@ -163,13 +163,13 @@ class ChatMessagePreviewProvider : PreviewParameterProvider { } } -class SimpleChatMessagePreviewProvider : PreviewParameterProvider { +internal class SimpleChatMessagePreviewProvider : PreviewParameterProvider { override val values: Sequence = sequence { yieldAll(simpleEntries) } } -class NoticeMessagePreviewProvider : PreviewParameterProvider { +internal class NoticeMessagePreviewProvider : PreviewParameterProvider { override val values: Sequence = sequence { yieldAll(noticeEntries) } diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/HighlightLevelPreviewProvider.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/HighlightLevelPreviewProvider.kt index 893ad8d64..df02c53c5 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/HighlightLevelPreviewProvider.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/mobile/preview/HighlightLevelPreviewProvider.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.feature.chat.presentation.mobile.preview import androidx.compose.ui.tooling.preview.PreviewParameterProvider import fr.outadoc.justchatting.component.chatapi.common.ChatEvent.Message.Highlighted.Level -class HighlightLevelPreviewProvider : PreviewParameterProvider { +internal class HighlightLevelPreviewProvider : PreviewParameterProvider { override val values: Sequence get() = sequence { yield(Level.Base) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/FollowedChannelsList.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/FollowedChannelsList.kt index e4b2c9cee..a1f0f0365 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/FollowedChannelsList.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/FollowedChannelsList.kt @@ -35,7 +35,7 @@ import org.koin.androidx.compose.koinViewModel @OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class) @Composable -fun FollowedChannelsList( +internal fun FollowedChannelsList( modifier: Modifier = Modifier, sizeClass: WindowSizeClass, onNavigate: (Screen) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveChannelsList.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveChannelsList.kt index ec4a2d52c..224b85466 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveChannelsList.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveChannelsList.kt @@ -30,7 +30,7 @@ import org.koin.androidx.compose.koinViewModel @OptIn(ExperimentalMaterialApi::class) @Composable -fun LiveChannelsList( +internal fun LiveChannelsList( modifier: Modifier = Modifier, sizeClass: WindowSizeClass, onNavigate: (Screen) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStream.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStream.kt index 01958b464..337de4d15 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStream.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStream.kt @@ -31,7 +31,7 @@ import kotlinx.datetime.Instant @ThemePreviews @Composable -fun LiveStreamPreview() { +internal fun LiveStreamPreview() { AppTheme { LiveStreamCard( modifier = Modifier.padding(8.dp), @@ -54,7 +54,7 @@ fun LiveStreamPreview() { @ThemePreviews @Composable -fun LiveStreamLongPreview() { +internal fun LiveStreamLongPreview() { AppTheme { LiveStreamCard( modifier = Modifier @@ -71,7 +71,7 @@ fun LiveStreamLongPreview() { } @Composable -fun LiveStreamCard( +internal fun LiveStreamCard( modifier: Modifier = Modifier, title: String? = null, userName: String? = null, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStreamCardPlaceholder.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStreamCardPlaceholder.kt index fedb1c3ec..6a74d217e 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStreamCardPlaceholder.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/LiveStreamCardPlaceholder.kt @@ -9,7 +9,7 @@ import com.google.accompanist.placeholder.material.placeholder import com.google.accompanist.placeholder.material.shimmer @Composable -fun LiveStreamCardPlaceholder(modifier: Modifier = Modifier) { +internal fun LiveStreamCardPlaceholder(modifier: Modifier = Modifier) { LiveStreamCard( modifier = modifier.placeholder( visible = true, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainActivity.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainActivity.kt index 066a51754..e6670ece3 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainActivity.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainActivity.kt @@ -33,7 +33,7 @@ import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.launch import org.koin.androidx.viewmodel.ext.android.viewModel -class MainActivity : AppCompatActivity() { +internal class MainActivity : AppCompatActivity() { private val viewModel: MainRouterViewModel by viewModel() diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainNavigation.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainNavigation.kt index b53912c74..02fb77da1 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainNavigation.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainNavigation.kt @@ -33,7 +33,7 @@ import dev.icerock.moko.resources.compose.stringResource import fr.outadoc.justchatting.shared.MR @Composable -fun MainNavigation( +internal fun MainNavigation( modifier: Modifier = Modifier, sizeClass: WindowSizeClass, selectedScreen: Screen, @@ -75,7 +75,7 @@ fun MainNavigation( } @Composable -fun CompactNavigation( +internal fun CompactNavigation( modifier: Modifier = Modifier, selectedScreen: Screen, onSelectedTabChange: (Screen) -> Unit, @@ -129,7 +129,7 @@ fun CompactNavigation( } @Composable -fun MediumNavigation( +internal fun MediumNavigation( modifier: Modifier = Modifier, selectedScreen: Screen, onSelectedTabChange: (Screen) -> Unit, @@ -204,7 +204,7 @@ fun MediumNavigation( } @Composable -fun ExpandedNavigation( +internal fun ExpandedNavigation( modifier: Modifier = Modifier, selectedScreen: Screen, onSelectedTabChange: (Screen) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainRouter.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainRouter.kt index 727539c71..332c62fe3 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainRouter.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/MainRouter.kt @@ -10,7 +10,7 @@ import fr.outadoc.justchatting.feature.preferences.presentation.mobile.Dependenc import fr.outadoc.justchatting.feature.preferences.presentation.mobile.SettingsContent @Composable -fun MainRouter( +internal fun MainRouter( modifier: Modifier = Modifier, sizeClass: WindowSizeClass, onChannelClick: (login: String) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/NoContent.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/NoContent.kt index bd49b7dc4..8ad153213 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/NoContent.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/NoContent.kt @@ -14,14 +14,14 @@ import fr.outadoc.justchatting.utils.ui.ScreenPreviews @ScreenPreviews @Composable -fun NoContentPreview() { +internal fun NoContentPreview() { AppTheme { NoContent() } } @Composable -fun NoContent(modifier: Modifier = Modifier) { +internal fun NoContent(modifier: Modifier = Modifier) { Column( modifier = modifier, verticalArrangement = Arrangement.Center, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/OnboardingScreen.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/OnboardingScreen.kt index 8356ae453..ef844d0d7 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/OnboardingScreen.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/OnboardingScreen.kt @@ -27,14 +27,14 @@ private val AppIconSize = 80.dp @ScreenPreviews @Composable -fun OnboardingScreenPreview() { +internal fun OnboardingScreenPreview() { AppTheme { OnboardingScreen(onLoginClick = {}) } } @Composable -fun OnboardingScreen( +internal fun OnboardingScreen( modifier: Modifier = Modifier, onLoginClick: () -> Unit, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/Screen.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/Screen.kt index 0fe092c00..adab8b057 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/Screen.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/Screen.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.feature.home.presentation.mobile import kotlinx.serialization.Serializable -sealed interface Screen { +internal sealed interface Screen { @Serializable data object Live : Screen @@ -16,4 +16,4 @@ sealed interface Screen { data object DependencyCredits : Screen } -val DefaultScreen = Screen.Live +internal val DefaultScreen = Screen.Live diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchBar.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchBar.kt index 424c0a980..779ace7be 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchBar.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchBar.kt @@ -11,7 +11,7 @@ import androidx.compose.ui.semantics.semantics import androidx.compose.ui.zIndex @Composable -fun SearchBar( +internal fun SearchBar( modifier: Modifier = Modifier, onChannelClick: (String) -> Unit, sizeClass: WindowSizeClass, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchResultsList.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchResultsList.kt index 0cb50d824..ab5d10ac7 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchResultsList.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchResultsList.kt @@ -27,7 +27,7 @@ import kotlinx.collections.immutable.toImmutableList @OptIn(ExperimentalMaterialApi::class) @Composable -fun SearchResultsList( +internal fun SearchResultsList( modifier: Modifier = Modifier, insets: PaddingValues = PaddingValues(), viewModel: ChannelSearchViewModel, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchScreenBar.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchScreenBar.kt index a1a60cff5..43a239708 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchScreenBar.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SearchScreenBar.kt @@ -27,7 +27,7 @@ import fr.outadoc.justchatting.utils.ui.HapticIconButton import org.koin.androidx.compose.koinViewModel @Composable -fun SearchScreenBar( +internal fun SearchScreenBar( modifier: Modifier = Modifier, onChannelClick: (login: String) -> Unit, sizeClass: WindowSizeClass, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SignInWithTwitchButton.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SignInWithTwitchButton.kt index 19e6c4abf..04b8da4ec 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SignInWithTwitchButton.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/SignInWithTwitchButton.kt @@ -20,12 +20,12 @@ private val TwitchBrandColor = Color(0xFF7718AD) @ThemePreviews @Composable -fun SignInWithTwitchButtonPreview() { +internal fun SignInWithTwitchButtonPreview() { SignInWithTwitchButton(onClick = {}) } @Composable -fun SignInWithTwitchButton( +internal fun SignInWithTwitchButton( modifier: Modifier = Modifier, onClick: () -> Unit, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/StreamTagChip.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/StreamTagChip.kt index 27df36f4c..e14427e20 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/StreamTagChip.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/StreamTagChip.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.text.style.TextOverflow import fr.outadoc.justchatting.utils.ui.LabelChip @Composable -fun StreamTagChip( +internal fun StreamTagChip( tag: String, modifier: Modifier = Modifier, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItem.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItem.kt index 55fd4f34b..93cbd8370 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItem.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItem.kt @@ -32,7 +32,7 @@ import kotlinx.datetime.Instant @ThemePreviews @Composable -fun UserItemPreview() { +internal fun UserItemPreview() { AppTheme { UserItemCard( modifier = Modifier @@ -48,7 +48,7 @@ fun UserItemPreview() { @OptIn(ExperimentalMaterial3Api::class) @Composable -fun UserItemCard( +internal fun UserItemCard( modifier: Modifier = Modifier, displayName: String? = null, followedAt: Instant? = null, @@ -72,7 +72,7 @@ fun UserItemCard( @OptIn(ExperimentalLayoutApi::class) @Composable -fun UserItem( +internal fun UserItem( modifier: Modifier = Modifier, displayName: String?, followedAt: Instant?, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItemCardPlaceholder.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItemCardPlaceholder.kt index 7f3f26661..e2be9bd89 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItemCardPlaceholder.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/mobile/UserItemCardPlaceholder.kt @@ -9,7 +9,7 @@ import com.google.accompanist.placeholder.material.placeholder import com.google.accompanist.placeholder.material.shimmer @Composable -fun UserItemCardPlaceholder(modifier: Modifier = Modifier) { +internal fun UserItemCardPlaceholder(modifier: Modifier = Modifier) { UserItemCard( modifier = modifier.placeholder( visible = true, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/AndroidLogRepository.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/AndroidLogRepository.kt index e46ed12fb..40a071189 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/AndroidLogRepository.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/AndroidLogRepository.kt @@ -13,7 +13,7 @@ import okio.sink import okio.source import java.util.UUID -class AndroidLogRepository(private val applicationContext: Context) : LogRepository { +internal class AndroidLogRepository(private val applicationContext: Context) : LogRepository { override val isSupported: Boolean = true diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DefaultReadExternalDependenciesList.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DefaultReadExternalDependenciesList.kt index 86c19c51d..6f067f3c4 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DefaultReadExternalDependenciesList.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DefaultReadExternalDependenciesList.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream -class DefaultReadExternalDependenciesList( +internal class DefaultReadExternalDependenciesList( private val context: Context, ) : ReadExternalDependenciesList { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogFileProvider.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogFileProvider.kt index 5c89f9d1e..73ea9a3ce 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogFileProvider.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogFileProvider.kt @@ -5,7 +5,7 @@ import androidx.core.content.FileProvider import fr.outadoc.justchatting.shared.R import okio.Path -class LogFileProvider : FileProvider(R.xml.log_share) { +internal class LogFileProvider : FileProvider(R.xml.log_share) { companion object { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/ContextExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/ContextExt.kt index 561213011..722c9b943 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/ContextExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/ContextExt.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.feature.preferences.presentation.mobile import android.content.Context import android.content.pm.PackageManager -val Context.applicationVersionName: String? +internal val Context.applicationVersionName: String? get() = try { applicationContext .packageManager diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/DependencyCreditsScreen.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/DependencyCreditsScreen.kt index 7cd01a246..f0cd20c6d 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/DependencyCreditsScreen.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/DependencyCreditsScreen.kt @@ -32,7 +32,7 @@ import org.koin.compose.koinInject @OptIn(ExperimentalMaterial3Api::class) @Composable -fun DependencyCreditsScreen( +internal fun DependencyCreditsScreen( modifier: Modifier = Modifier, onNavigateUp: () -> Unit, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsContent.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsContent.kt index 465265d65..c1861408b 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsContent.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsContent.kt @@ -24,7 +24,7 @@ import org.koin.androidx.compose.koinViewModel @OptIn(ExperimentalMaterial3Api::class) @Composable -fun SettingsContent( +internal fun SettingsContent( modifier: Modifier = Modifier, sizeClass: WindowSizeClass, onNavigate: (Screen) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsHeader.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsHeader.kt index 6cd73b8ea..9f853ebc4 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsHeader.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsHeader.kt @@ -14,7 +14,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews @ThemePreviews @Composable -fun SettingsHeaderPreview() { +internal fun SettingsHeaderPreview() { AppTheme { Surface { SettingsHeader { @@ -25,7 +25,7 @@ fun SettingsHeaderPreview() { } @Composable -fun SettingsHeader( +internal fun SettingsHeader( modifier: Modifier = Modifier, content: @Composable () -> Unit, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsList.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsList.kt index 3df175176..b6abe31d4 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsList.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsList.kt @@ -38,7 +38,7 @@ import fr.outadoc.justchatting.utils.ui.plus @ThemePreviews @Composable -fun SettingsListPreview() { +internal fun SettingsListPreview() { AppTheme { SettingsList( appPreferences = AppPreferences(), @@ -56,7 +56,7 @@ fun SettingsListPreview() { @OptIn(ExperimentalPermissionsApi::class) @Composable -fun SettingsList( +internal fun SettingsList( modifier: Modifier = Modifier, appPreferences: AppPreferences, onAppPreferencesChange: (AppPreferences) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSlider.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSlider.kt index 58103a426..0371d8584 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSlider.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSlider.kt @@ -18,7 +18,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews @ThemePreviews @Composable -fun SettingsSliderPreview() { +internal fun SettingsSliderPreview() { AppTheme { Column(modifier = Modifier.width(256.dp)) { SettingsSlider( @@ -51,7 +51,7 @@ fun SettingsSliderPreview() { } @Composable -fun SettingsSlider( +internal fun SettingsSlider( modifier: Modifier = Modifier, value: Int, onValueChange: (Int) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSwitch.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSwitch.kt index 187797df9..4bd96af31 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSwitch.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsSwitch.kt @@ -23,7 +23,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews @ThemePreviews @Composable -fun SettingsSwitchPreview() { +internal fun SettingsSwitchPreview() { AppTheme { Column(modifier = Modifier.width(256.dp)) { SettingsSwitch( @@ -51,7 +51,7 @@ fun SettingsSwitchPreview() { } @Composable -fun SettingsSwitch( +internal fun SettingsSwitch( modifier: Modifier = Modifier, checked: Boolean, onCheckedChange: (Boolean) -> Unit, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsText.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsText.kt index e9cf66b56..1e6de36c6 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsText.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/mobile/SettingsText.kt @@ -22,7 +22,7 @@ import fr.outadoc.justchatting.utils.ui.ThemePreviews @ThemePreviews @Composable -fun SettingsTextPreview() { +internal fun SettingsTextPreview() { AppTheme { Column(modifier = Modifier.width(256.dp)) { SettingsText( @@ -39,7 +39,7 @@ fun SettingsTextPreview() { @ThemePreviews @Composable -fun SettingsTextSubtitlePreview() { +internal fun SettingsTextSubtitlePreview() { AppTheme { Column(modifier = Modifier.width(256.dp)) { SettingsText( @@ -54,7 +54,7 @@ fun SettingsTextSubtitlePreview() { } @Composable -fun SettingsText( +internal fun SettingsText( modifier: Modifier = Modifier, onClick: () -> Unit = {}, onClickLabel: String? = null, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt index e752868ed..326ae7eeb 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt @@ -4,7 +4,7 @@ import kotlinx.coroutines.CoroutineScope import androidx.lifecycle.ViewModel as AndroidXViewModel import androidx.lifecycle.viewModelScope as androidXViewModelScope -actual abstract class ViewModel actual constructor() : AndroidXViewModel() { +internal actual abstract class ViewModel actual constructor() : AndroidXViewModel() { actual val viewModelScope: CoroutineScope = androidXViewModelScope actual override fun onCleared() = super.onCleared() diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/AndroidNetworkStateObserver.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/AndroidNetworkStateObserver.kt index a1f3517be..4bd0ef340 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/AndroidNetworkStateObserver.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/AndroidNetworkStateObserver.kt @@ -10,7 +10,7 @@ import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.callbackFlow -class AndroidNetworkStateObserver( +internal class AndroidNetworkStateObserver( private val connectivityManager: ConnectivityManager, ) : NetworkStateObserver { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt index efe75562d..906da1568 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.utils.core import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers -actual object DispatchersProvider { +internal actual object DispatchersProvider { actual val main: CoroutineDispatcher = Dispatchers.Main actual val io: CoroutineDispatcher = Dispatchers.IO actual val default: CoroutineDispatcher = Dispatchers.Default diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/IntentExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/IntentExt.kt index 2cbddf7ee..3d9087338 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/IntentExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/IntentExt.kt @@ -10,14 +10,14 @@ private enum class IntentComponent { ForegroundService, } -fun Intent.toPendingActivityIntent( +internal fun Intent.toPendingActivityIntent( context: Context, mutable: Boolean = false, ): PendingIntent { return toPendingIntent(context, mutable, IntentComponent.Activity) } -fun Intent.toPendingForegroundServiceIntent( +internal fun Intent.toPendingForegroundServiceIntent( context: Context, mutable: Boolean = false, ): PendingIntent { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt index c55a1c7dc..2612fd77f 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt @@ -6,12 +6,12 @@ import io.fluidsonic.currency.toPlatform import java.text.NumberFormat import java.util.Locale -actual fun Float.formatPercent(): String = +internal actual fun Float.formatPercent(): String = NumberFormat.getPercentInstance(Locale.getDefault()).format(this) -actual fun Int.formatNumber(): String = "%,d".format(this) +internal actual fun Int.formatNumber(): String = "%,d".format(this) -actual fun BigDecimal.formatCurrency(currency: Currency): String = +internal actual fun BigDecimal.formatCurrency(currency: Currency): String = NumberFormat.getCurrencyInstance() .apply { this.currency = currency.toPlatform() } .format(this) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/TwitchExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/TwitchExt.kt index 8efe29d89..da0dbf768 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/TwitchExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/core/TwitchExt.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.utils.core import com.eygraber.uri.Uri -fun createChannelExternalLink(channelLogin: String): String = +internal fun createChannelExternalLink(channelLogin: String): String = Uri.parse("https://twitch.tv") .buildUpon() .appendPath(channelLogin) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/http/AndroidHttpClientProvider.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/http/AndroidHttpClientProvider.kt index 672a261b1..806602c3d 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/http/AndroidHttpClientProvider.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/http/AndroidHttpClientProvider.kt @@ -16,7 +16,7 @@ import io.ktor.serialization.kotlinx.json.json import kotlinx.serialization.json.Json import kotlin.time.Duration.Companion.seconds -class AndroidHttpClientProvider( +internal class AndroidHttpClientProvider( private val json: Json, ) : BaseHttpClientProvider { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/logging/AndroidLogStrategy.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/logging/AndroidLogStrategy.kt index 27c1676fa..290150528 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/logging/AndroidLogStrategy.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/logging/AndroidLogStrategy.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.utils.logging import android.util.Log -object AndroidLogStrategy : LogStrategy { +public object AndroidLogStrategy : LogStrategy { override fun println(level: Logger.Level, tag: String?, content: String) { Log.println(level.toPlatform(), tag, content) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt index 0e566c76e..39f437d27 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt @@ -1,3 +1,3 @@ package fr.outadoc.justchatting.utils.parcel -actual typealias Parcelable = android.os.Parcelable +internal actual typealias Parcelable = android.os.Parcelable diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ActivityExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ActivityExt.kt index 8ab72c3c5..30dc544cd 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ActivityExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ActivityExt.kt @@ -4,7 +4,7 @@ import android.app.Activity import android.os.Build import android.view.Display -val Activity.isLaunchedFromBubbleCompat: Boolean +internal val Activity.isLaunchedFromBubbleCompat: Boolean get() = if (Build.VERSION.SDK_INT >= 31) { isLaunchedFromBubble } else { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/AppTheme.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/AppTheme.kt index 94fa03bff..9f2376f02 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/AppTheme.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/AppTheme.kt @@ -13,7 +13,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext @Composable -fun AppTheme( +internal fun AppTheme( isDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit, ) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/BubbleExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/BubbleExt.kt index 8d88de264..b6d0807dc 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/BubbleExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/BubbleExt.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext @Composable -fun canOpenInBubble(): Boolean { +internal fun canOpenInBubble(): Boolean { val context = LocalContext.current return remember { Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/Chip.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/Chip.kt index dc3a9c06e..f1a5fb0e0 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/Chip.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/Chip.kt @@ -15,7 +15,7 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.dp @Composable -fun LabelChip( +internal fun LabelChip( modifier: Modifier = Modifier, style: TextStyle = MaterialTheme.typography.labelSmall, color: Color = LocalContentColor.current.copy(alpha = 0.8f), @@ -41,7 +41,7 @@ fun LabelChip( @ThemePreviews @Composable -fun LabelChipPreview() { +internal fun LabelChipPreview() { AppTheme { Surface { LabelChip { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorExt.kt index 68eb271d5..058b65310 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorExt.kt @@ -11,7 +11,7 @@ import kotlin.math.min private const val MIN_LUMINANCE_SEARCH_MAX_ITERATIONS = 10 private const val MIN_LUMINANCE_SEARCH_PRECISION = 1 -fun ensureColorIsAccessible( +internal fun ensureColorIsAccessible( foreground: Color, background: Color, minimumContrast: Double = 4.5, @@ -75,7 +75,7 @@ private fun calculateLuminanceContrast(foregroundY: Double, backgroundY: Double) } @ColorInt -fun ensureMinimumAlpha( +internal fun ensureMinimumAlpha( @ColorInt foreground: Int, @ColorInt background: Int, minimumContrast: Float = 10.0f, @@ -97,10 +97,10 @@ private fun colorToXyz(color: Color): DoubleArray { private fun xyzToColor(x: Double, y: Double, z: Double) = Color(ColorUtils.XYZToColor(x, y, z)) -val Color.isLight: Boolean +internal val Color.isLight: Boolean get() = luminance() > 0.5 -fun String.parseHexColor(): Color? = +internal fun String.parseHexColor(): Color? = try { Color(android.graphics.Color.parseColor(this)) } catch (e: IllegalArgumentException) { diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorSchemeExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorSchemeExt.kt index d444767e6..1ca94fc22 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorSchemeExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ColorSchemeExt.kt @@ -5,5 +5,5 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.luminance @get:Composable -val ColorScheme.isDark: Boolean +internal val ColorScheme.isDark: Boolean get() = background.luminance() < 0.5 diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ContextExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ContextExt.kt index 7fc06b89e..3fdea5f63 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ContextExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ContextExt.kt @@ -4,10 +4,10 @@ import android.content.Context import android.widget.Toast import androidx.annotation.StringRes -fun Context.toast(@StringRes resId: Int) { +internal fun Context.toast(@StringRes resId: Int) { Toast.makeText(this, resId, Toast.LENGTH_LONG).show() } -fun Context.shortToast(@StringRes resId: Int) { +internal fun Context.shortToast(@StringRes resId: Int) { Toast.makeText(this, resId, Toast.LENGTH_SHORT).show() } diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/CustomColors.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/CustomColors.kt index 80622c165..d17630236 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/CustomColors.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/CustomColors.kt @@ -18,13 +18,13 @@ private val lightColors = CustomColorScheme( onSuccessContainer = Color(0xFFB2F655), ) -data class CustomColorScheme( +internal data class CustomColorScheme( val success: Color, val successContainer: Color, val onSuccess: Color, val onSuccessContainer: Color, ) -val MaterialTheme.customColors: CustomColorScheme +internal val MaterialTheme.customColors: CustomColorScheme @Composable get() = (if (colorScheme.isDark) darkColors else lightColors) diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/HapticIconButton.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/HapticIconButton.kt index 6b223e885..6c7fbfaf1 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/HapticIconButton.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/HapticIconButton.kt @@ -11,7 +11,7 @@ import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback @Composable -fun HapticIconButton( +internal fun HapticIconButton( onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/PaddingValuesExt.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/PaddingValuesExt.kt index 64d85e47d..57812b311 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/PaddingValuesExt.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/PaddingValuesExt.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalLayoutDirection @Composable -operator fun PaddingValues.plus(paddingValues: PaddingValues): PaddingValues { +internal operator fun PaddingValues.plus(paddingValues: PaddingValues): PaddingValues { val layoutDirection = LocalLayoutDirection.current return PaddingValues( start = calculateStartPadding(layoutDirection) + paddingValues.calculateStartPadding( diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/RecompositionHighlighter.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/RecompositionHighlighter.kt index ba2294daa..a7ee80be5 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/RecompositionHighlighter.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/RecompositionHighlighter.kt @@ -38,7 +38,7 @@ import kotlin.math.min * size and interpolates from red to green as more recompositions occur before a timeout. */ @Stable -fun Modifier.recomposeHighlighter(): Modifier = this.then(recomposeModifier) +internal fun Modifier.recomposeHighlighter(): Modifier = this.then(recomposeModifier) // Use a single instance + @Stable to ensure that recompositions can enable skipping optimizations // Modifier.composed will still remember unique data per call site. diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ScreenPreviews.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ScreenPreviews.kt index add2febde..884cf7c1f 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ScreenPreviews.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ScreenPreviews.kt @@ -14,4 +14,4 @@ import androidx.compose.ui.tooling.preview.Preview uiMode = Configuration.UI_MODE_NIGHT_NO, showSystemUi = true, ) -annotation class ScreenPreviews +internal annotation class ScreenPreviews diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ThemePreviews.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ThemePreviews.kt index a9e392d70..496307069 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ThemePreviews.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/ThemePreviews.kt @@ -13,4 +13,4 @@ import androidx.compose.ui.tooling.preview.Preview uiMode = Configuration.UI_MODE_NIGHT_NO, showBackground = true, ) -annotation class ThemePreviews +internal annotation class ThemePreviews diff --git a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/TimeUtils.kt b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/TimeUtils.kt index 1551396c7..6979657fa 100644 --- a/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/TimeUtils.kt +++ b/shared/src/androidMain/kotlin/fr/outadoc/justchatting/utils/ui/TimeUtils.kt @@ -17,7 +17,7 @@ import java.util.Date import kotlin.time.Duration @Composable -fun Instant.formatTimestamp(): String? { +internal fun Instant.formatTimestamp(): String? { val context = LocalContext.current val format = remember { DateFormat.getTimeFormat(context) } return remember(this) { @@ -30,7 +30,7 @@ fun Instant.formatTimestamp(): String? { } @Composable -fun Instant.formatDate( +internal fun Instant.formatDate( tz: TimeZone = TimeZone.currentSystemDefault(), clock: Clock = Clock.System, ): String? { @@ -49,7 +49,7 @@ fun Instant.formatDate( } } -fun Duration.format(context: Context): String = +internal fun Duration.format(context: Context): String = sequence { toComponents { days, hours, minutes, seconds, _ -> days.takeIf { it > 0 }?.let { diff --git a/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCaseTest.kt b/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCaseTest.kt index 07ab11acf..f7c1d26c8 100644 --- a/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCaseTest.kt +++ b/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCaseTest.kt @@ -8,7 +8,7 @@ import kotlinx.collections.immutable.persistentSetOf import org.junit.Assert.assertEquals import org.junit.Test -class FilterAutocompleteItemsUseCaseTest { +internal class FilterAutocompleteItemsUseCaseTest { private val instance = FilterAutocompleteItemsUseCase() diff --git a/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/util/chat/TwitchIrcCommandParserTest.kt b/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/util/chat/TwitchIrcCommandParserTest.kt index 570433317..7d3cc9fea 100644 --- a/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/util/chat/TwitchIrcCommandParserTest.kt +++ b/shared/src/androidUnitTest/kotlin/fr/outadoc/justchatting/util/chat/TwitchIrcCommandParserTest.kt @@ -13,7 +13,7 @@ import org.junit.Test import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds -class TwitchIrcCommandParserTest { +internal class TwitchIrcCommandParserTest { @Test fun `Parse simple PRIVMSG`() = test { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Badge.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Badge.kt index ff9ce53de..e2c6b3f9d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Badge.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Badge.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.common -data class Badge( +internal data class Badge( val id: String, val version: String, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEmote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEmote.kt index dce763272..cc5d642c0 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEmote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEmote.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.common -data class ChatEmote( +internal data class ChatEmote( val id: String, val name: String, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEvent.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEvent.kt index e4a78caec..66ea1843e 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEvent.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ChatEvent.kt @@ -8,7 +8,7 @@ import kotlinx.datetime.Instant import kotlin.time.Duration @Immutable -sealed interface ChatEvent { +internal sealed interface ChatEvent { sealed class Message : ChatEvent { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Chatter.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Chatter.kt index 735ea667a..eeebb08f0 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Chatter.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Chatter.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.common -data class Chatter( +internal data class Chatter( val id: String, val login: String, val displayName: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ConnectionStatus.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ConnectionStatus.kt index a5dbb01e3..31f854c10 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ConnectionStatus.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/ConnectionStatus.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.common -data class ConnectionStatus( +internal data class ConnectionStatus( val isAlive: Boolean = false, val preventSendingMessages: Boolean = true, val registeredListeners: Int = 0, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Emote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Emote.kt index 5cf6a4fcb..804941520 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Emote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Emote.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.component.chatapi.common import androidx.compose.runtime.Immutable @Immutable -data class Emote( +internal data class Emote( val name: String, val urls: EmoteUrls, val ownerId: String? = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/EmoteUrls.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/EmoteUrls.kt index 6de820759..5d8fb5386 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/EmoteUrls.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/EmoteUrls.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.component.chatapi.common import androidx.compose.runtime.Immutable @Immutable -data class EmoteUrls( +internal data class EmoteUrls( val dark: Map, val light: Map, ) { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Icon.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Icon.kt index 163c652dc..89d9c5a35 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Icon.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Icon.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.common -enum class Icon { +internal enum class Icon { Bolt, CallReceived, Campaign, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/PinnedMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/PinnedMessage.kt index 9fbc3f743..3e4a260d6 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/PinnedMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/PinnedMessage.kt @@ -4,7 +4,7 @@ import androidx.compose.runtime.Immutable import kotlinx.datetime.Instant @Immutable -data class PinnedMessage( +internal data class PinnedMessage( val pinId: String, val pinnedBy: User, val message: Message, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Poll.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Poll.kt index 1a813f109..a7409e096 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Poll.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Poll.kt @@ -5,7 +5,7 @@ import kotlinx.datetime.Instant import kotlin.time.Duration @Immutable -data class Poll( +internal data class Poll( val pollId: String, val status: Status, val title: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Prediction.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Prediction.kt index 312518473..509ea2ddf 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Prediction.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Prediction.kt @@ -5,7 +5,7 @@ import kotlinx.datetime.Instant import kotlin.time.Duration @Immutable -data class Prediction( +internal data class Prediction( val id: String, val title: String, val status: Status, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Pronoun.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Pronoun.kt index c00151bbe..e341048bf 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Pronoun.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Pronoun.kt @@ -3,6 +3,6 @@ package fr.outadoc.justchatting.component.chatapi.common import androidx.compose.runtime.Immutable @Immutable -data class Pronoun( +internal data class Pronoun( val displayPronoun: String? = null, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Raid.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Raid.kt index d6c23515b..5c9721695 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Raid.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/Raid.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.component.chatapi.common import androidx.compose.runtime.Immutable @Immutable -sealed class Raid { +internal sealed class Raid { data class Preparing( val targetId: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactoriesProvider.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactoriesProvider.kt index 84bc32dbb..8b05a017e 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactoriesProvider.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactoriesProvider.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.component.chatapi.common.handler -fun interface ChatCommandHandlerFactoriesProvider { +internal fun interface ChatCommandHandlerFactoriesProvider { fun get(): List } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactory.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactory.kt index c2778c84a..5fb1b13ad 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactory.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatCommandHandlerFactory.kt @@ -2,6 +2,6 @@ package fr.outadoc.justchatting.component.chatapi.common.handler import kotlinx.coroutines.CoroutineScope -interface ChatCommandHandlerFactory { +internal interface ChatCommandHandlerFactory { fun create(scope: CoroutineScope, channelLogin: String, channelId: String): ChatEventHandler } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatEventHandler.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatEventHandler.kt index 706cd4ed7..4a0ffd0b2 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatEventHandler.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/handler/ChatEventHandler.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ConnectionStatus import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.StateFlow -interface ChatEventHandler { +internal interface ChatEventHandler { val commandFlow: Flow val connectionStatus: StateFlow diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPlugin.kt index a689167b3..5f638f3ef 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPlugin.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.chatapi.common.pubsub import fr.outadoc.justchatting.component.chatapi.common.ChatEvent -interface PubSubPlugin { +internal interface PubSubPlugin { fun getTopic(channelId: String): String fun parseMessage(payload: String): List diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPluginsProvider.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPluginsProvider.kt index 5d0dd4bad..dc2309640 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPluginsProvider.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/common/pubsub/PubSubPluginsProvider.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.component.chatapi.common.pubsub -fun interface PubSubPluginsProvider { +internal fun interface PubSubPluginsProvider { fun get(): List> } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentChannelsDao.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentChannelsDao.kt index 199ebf1f3..865700c87 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentChannelsDao.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentChannelsDao.kt @@ -5,7 +5,7 @@ import app.cash.sqldelight.coroutines.mapToList import fr.outadoc.justchatting.utils.core.DispatchersProvider import kotlinx.coroutines.flow.Flow -class DbRecentChannelsDao( +internal class DbRecentChannelsDao( private val recentChannelQueries: RecentChannelQueries, ) : RecentChannelsDao { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentEmotesDao.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentEmotesDao.kt index fb62ef09a..b3c72cb5d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentEmotesDao.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/DbRecentEmotesDao.kt @@ -5,7 +5,7 @@ import app.cash.sqldelight.coroutines.mapToList import fr.outadoc.justchatting.utils.core.DispatchersProvider import kotlinx.coroutines.flow.Flow -class DbRecentEmotesDao( +internal class DbRecentEmotesDao( private val recentEmoteQueries: RecentEmoteQueries, ) : RecentEmotesDao { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentChannelsDao.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentChannelsDao.kt index 9b8ed5391..8fa4ca80b 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentChannelsDao.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentChannelsDao.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.chatapi.db import kotlinx.coroutines.flow.Flow -interface RecentChannelsDao { +internal interface RecentChannelsDao { fun getAll(): Flow> fun insert(channel: Recent_channels) } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentEmotesDao.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentEmotesDao.kt index b29bf7d3d..abb973537 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentEmotesDao.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/RecentEmotesDao.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.chatapi.db import kotlinx.coroutines.flow.Flow -interface RecentEmotesDao { +internal interface RecentEmotesDao { fun getAll(): Flow> fun insertAll(emotes: Collection) } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelFollow.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelFollow.kt index 750dc1851..18e7eaf5f 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelFollow.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelFollow.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.utils.parcel.Parcelable import fr.outadoc.justchatting.utils.parcel.Parcelize @Parcelize -data class ChannelFollow( +internal data class ChannelFollow( val user: User, val followedAt: String, ) : Parcelable diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSchedule.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSchedule.kt index bde583612..d588e696f 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSchedule.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSchedule.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.domain.model -data class ChannelSchedule( +internal data class ChannelSchedule( val segments: List, val userId: String, val userLogin: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleSegment.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleSegment.kt index 00028bdc5..3f3083e9a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleSegment.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleSegment.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.component.chatapi.domain.model import fr.outadoc.justchatting.component.twitch.http.model.StreamCategory import kotlinx.datetime.Instant -data class ChannelScheduleSegment( +internal data class ChannelScheduleSegment( val id: String, val startTime: Instant, val endTime: Instant, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleVacation.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleVacation.kt index a20f93c52..6c4511bf4 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleVacation.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelScheduleVacation.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.chatapi.domain.model import kotlinx.datetime.Instant -data class ChannelScheduleVacation( +internal data class ChannelScheduleVacation( val startTime: Instant, val endTime: Instant, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSearchResult.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSearchResult.kt index e0c1a7f78..e5e3462a6 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSearchResult.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ChannelSearchResult.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.utils.parcel.Parcelize import kotlinx.collections.immutable.persistentListOf @Parcelize -data class ChannelSearchResult( +internal data class ChannelSearchResult( val title: String, val user: User, val language: String? = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/OAuthAppCredentials.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/OAuthAppCredentials.kt index 2825431a6..e40e30735 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/OAuthAppCredentials.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/OAuthAppCredentials.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.domain.model -data class OAuthAppCredentials( +internal data class OAuthAppCredentials( val clientId: String, val redirectUri: String, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Pagination.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Pagination.kt index 5be30a2af..726eea3be 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Pagination.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Pagination.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.domain.model -sealed class Pagination { +internal sealed class Pagination { data class Previous(val cursor: String) : Pagination() data class Next(val cursor: String) : Pagination() } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/RecentEmote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/RecentEmote.kt index 2a09f7d18..f7745b684 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/RecentEmote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/RecentEmote.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.chatapi.domain.model import kotlinx.datetime.Instant -data class RecentEmote( +internal data class RecentEmote( val name: String, val url: String, val usedAt: Instant, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Stream.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Stream.kt index 650ccbe25..63b74e83a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Stream.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/Stream.kt @@ -6,7 +6,7 @@ import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf @Parcelize -data class Stream( +internal data class Stream( val id: String, val user: User, val gameName: String? = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/TwitchBadge.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/TwitchBadge.kt index edf876011..64cbdf4c2 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/TwitchBadge.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/TwitchBadge.kt @@ -4,7 +4,7 @@ import androidx.compose.runtime.Immutable import fr.outadoc.justchatting.component.chatapi.common.EmoteUrls @Immutable -data class TwitchBadge( +internal data class TwitchBadge( val setId: String, val title: String? = null, val version: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/User.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/User.kt index 619727c35..5a8f715f5 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/User.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/User.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.utils.parcel.Parcelable import fr.outadoc.justchatting.utils.parcel.Parcelize @Parcelize -data class User( +internal data class User( val id: String, val login: String, val displayName: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ValidationResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ValidationResponse.kt index 81d43e255..813899922 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ValidationResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/model/ValidationResponse.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.chatapi.domain.model -class ValidationResponse( +internal class ValidationResponse( val clientId: String, val login: String, val userId: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/AuthRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/AuthRepository.kt index 76d646266..db2901218 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/AuthRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/AuthRepository.kt @@ -9,7 +9,7 @@ import fr.outadoc.justchatting.utils.core.DispatchersProvider import kotlinx.coroutines.flow.first import kotlinx.coroutines.withContext -class AuthRepository( +internal class AuthRepository( private val api: IdApi, private val preferencesRepository: PreferenceRepository, private val oAuthAppCredentials: OAuthAppCredentials, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/EmotesRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/EmotesRepository.kt index e81d989bf..b8fae82bd 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/EmotesRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/EmotesRepository.kt @@ -18,7 +18,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.withContext import kotlinx.datetime.Instant -class EmotesRepository( +internal class EmotesRepository( private val twitchApi: TwitchApi, private val stvEmotesApi: StvEmotesApi, private val bttvEmotesApi: BttvEmotesApi, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepository.kt index da5412989..1e40ef9a1 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepository.kt @@ -10,7 +10,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.model.User import kotlinx.coroutines.flow.Flow import kotlinx.datetime.Instant -interface TwitchRepository { +internal interface TwitchRepository { suspend fun loadSearchChannels(query: String): Flow> suspend fun loadFollowedStreams(): Flow> suspend fun loadFollowedChannels(): Flow> diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepositoryImpl.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepositoryImpl.kt index da43922e4..4a20ae239 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepositoryImpl.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/TwitchRepositoryImpl.kt @@ -31,7 +31,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.withContext import kotlinx.datetime.Instant -class TwitchRepositoryImpl( +internal class TwitchRepositoryImpl( private val twitchApi: TwitchApi, private val preferencesRepository: PreferenceRepository, private val recentChannelsDao: RecentChannelsDao, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedChannelsDataSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedChannelsDataSource.kt index a19c81c27..50b3ecb5b 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedChannelsDataSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedChannelsDataSource.kt @@ -8,7 +8,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.model.User import fr.outadoc.justchatting.component.twitch.http.api.TwitchApi import fr.outadoc.justchatting.utils.logging.logError -class FollowedChannelsDataSource( +internal class FollowedChannelsDataSource( private val userId: String?, private val twitchApi: TwitchApi, ) : PagingSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedStreamsDataSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedStreamsDataSource.kt index 0942de993..3b08bff77 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedStreamsDataSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/FollowedStreamsDataSource.kt @@ -9,7 +9,7 @@ import fr.outadoc.justchatting.component.twitch.http.api.TwitchApi import fr.outadoc.justchatting.utils.logging.logError import kotlinx.collections.immutable.toPersistentList -class FollowedStreamsDataSource( +internal class FollowedStreamsDataSource( private val userId: String?, private val twitchApi: TwitchApi, ) : PagingSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/SearchChannelsDataSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/SearchChannelsDataSource.kt index a8dee123c..971956972 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/SearchChannelsDataSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/chatapi/domain/repository/datasource/SearchChannelsDataSource.kt @@ -8,7 +8,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.model.User import fr.outadoc.justchatting.component.twitch.http.api.TwitchApi import fr.outadoc.justchatting.utils.logging.logError -class SearchChannelsDataSource( +internal class SearchChannelsDataSource( private val query: String, private val twitchApi: TwitchApi, ) : PagingSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/Deeplink.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/Deeplink.kt index 2339eadbc..99a05a4a7 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/Deeplink.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/Deeplink.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.deeplink -sealed class Deeplink { +internal sealed class Deeplink { data class ViewChannel(val login: String) : Deeplink() data class Authenticated(val token: String) : Deeplink() } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/DeeplinkParser.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/DeeplinkParser.kt index 1cd623d22..a8886a30c 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/DeeplinkParser.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/deeplink/DeeplinkParser.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.component.deeplink import com.eygraber.uri.Uri import fr.outadoc.justchatting.component.chatapi.domain.model.OAuthAppCredentials -data class DeeplinkParser( +internal data class DeeplinkParser( private val oAuthAppCredentials: OAuthAppCredentials, ) { fun parseDeeplink(uri: String): Deeplink? { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/ICommand.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/ICommand.kt index a8159a3cd..12b006ccc 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/ICommand.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/ICommand.kt @@ -6,7 +6,7 @@ package fr.outadoc.justchatting.component.ircparser.core -interface ICommand { +internal interface ICommand { val command: String } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessage.kt index c6e501559..b04314979 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessage.kt @@ -6,7 +6,7 @@ package fr.outadoc.justchatting.component.ircparser.core.message -data class IrcMessage( +internal data class IrcMessage( val tags: Map = emptyMap(), val prefix: String? = null, val command: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessageComponents.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessageComponents.kt index 1681635be..7d234663c 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessageComponents.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/IrcMessageComponents.kt @@ -6,7 +6,7 @@ package fr.outadoc.justchatting.component.ircparser.core.message -data class IrcMessageComponents( +internal data class IrcMessageComponents( val parameters: List = listOf(), val tags: Map = mapOf(), val prefix: String? = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/MessageParsing.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/MessageParsing.kt index 46e8ad873..d84c3176d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/MessageParsing.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/core/message/MessageParsing.kt @@ -6,17 +6,17 @@ package fr.outadoc.justchatting.component.ircparser.core.message -interface IMessageParser { +internal interface IMessageParser { fun parse(message: IrcMessage): T? } -interface IComponentsParser { +internal interface IComponentsParser { fun parseFromComponents(components: IrcMessageComponents): T? } -abstract class MessageParser : +internal abstract class MessageParser : IMessageParser, IComponentsParser { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/CharacterCodes.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/CharacterCodes.kt index 9a818c574..b87c31592 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/CharacterCodes.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/CharacterCodes.kt @@ -6,7 +6,7 @@ package fr.outadoc.justchatting.component.ircparser.irc -object CharacterCodes { +internal object CharacterCodes { val LF: Char = 0xA.toChar() val CR: Char = 0xD.toChar() val AT: Char = 0x40.toChar() diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/IrcMessageParser.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/IrcMessageParser.kt index 053aac8a8..25781df71 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/IrcMessageParser.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/IrcMessageParser.kt @@ -9,11 +9,11 @@ package fr.outadoc.justchatting.component.ircparser.irc.message import fr.outadoc.justchatting.component.ircparser.core.message.IrcMessage import fr.outadoc.justchatting.component.ircparser.irc.CharacterCodes -interface IIrcMessageParser { +internal interface IIrcMessageParser { fun parse(line: String): IrcMessage? } -object IrcMessageParser : IIrcMessageParser { +internal object IrcMessageParser : IIrcMessageParser { private const val MAX_LINE_LENGTH = 8192 @@ -181,7 +181,7 @@ object IrcMessageParser : IIrcMessageParser { } } -object ParseHelper { +internal object ParseHelper { fun parseToKeysAndOptionalValues( string: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/NoticeMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/NoticeMessage.kt index 9cfc9616c..9c2e8d0d5 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/NoticeMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/NoticeMessage.kt @@ -10,7 +10,7 @@ import fr.outadoc.justchatting.component.ircparser.core.ICommand import fr.outadoc.justchatting.component.ircparser.core.message.IrcMessageComponents import fr.outadoc.justchatting.component.ircparser.core.message.MessageParser -object NoticeMessage : ICommand { +internal object NoticeMessage : ICommand { override val command = "NOTICE" diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/PrivMsgMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/PrivMsgMessage.kt index 14f5a06f6..9c144f03a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/PrivMsgMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/message/rfc1459/PrivMsgMessage.kt @@ -12,7 +12,7 @@ import fr.outadoc.justchatting.component.ircparser.core.message.MessageParser import fr.outadoc.justchatting.component.ircparser.irc.prefix.Prefix import fr.outadoc.justchatting.component.ircparser.irc.prefix.PrefixParser -object PrivMsgMessage : ICommand { +internal object PrivMsgMessage : ICommand { override val command = "PRIVMSG" diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/IPrefixParser.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/IPrefixParser.kt index cc24cede2..d0809b732 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/IPrefixParser.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/IPrefixParser.kt @@ -6,6 +6,6 @@ package fr.outadoc.justchatting.component.ircparser.irc.prefix -interface IPrefixParser { +internal interface IPrefixParser { fun parse(rawPrefix: String): Prefix? } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/Prefix.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/Prefix.kt index 3355b0115..88892721f 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/Prefix.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/Prefix.kt @@ -6,6 +6,6 @@ package fr.outadoc.justchatting.component.ircparser.irc.prefix -fun prefix(nick: String) = Prefix(nick = nick) +internal fun prefix(nick: String) = Prefix(nick = nick) -data class Prefix(val nick: String, val user: String? = null, val host: String? = null) +internal data class Prefix(val nick: String, val user: String? = null, val host: String? = null) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/PrefixParser.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/PrefixParser.kt index 7b006edbe..23ece6cae 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/PrefixParser.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/ircparser/irc/prefix/PrefixParser.kt @@ -8,7 +8,7 @@ package fr.outadoc.justchatting.component.ircparser.irc.prefix import fr.outadoc.justchatting.component.ircparser.irc.CharacterCodes -object PrefixParser : IPrefixParser { +internal object PrefixParser : IPrefixParser { override fun parse(rawPrefix: String): Prefix? { var raw = rawPrefix diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppPreferences.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppPreferences.kt index ecba2f478..268ce2c5d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppPreferences.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppPreferences.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.preferences.data -data class AppPreferences( +internal data class AppPreferences( val appUser: AppUser = AppUser.NotLoggedIn, val showTimestamps: Boolean = true, val enableRecentMessages: Boolean = true, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppUser.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppUser.kt index af6555121..3ff238b45 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppUser.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/data/AppUser.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.component.preferences.data -sealed class AppUser { +internal sealed class AppUser { data class LoggedIn( val userId: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/NoopPreferenceRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/NoopPreferenceRepository.kt index a9b25dfbe..b82bcaa5c 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/NoopPreferenceRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/NoopPreferenceRepository.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.preferences.data.AppPreferences import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flowOf -class NoopPreferenceRepository : PreferenceRepository { +internal class NoopPreferenceRepository : PreferenceRepository { override val currentPreferences: Flow = flowOf(AppPreferences()) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/PreferenceRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/PreferenceRepository.kt index 672bd6df9..4fcf2d1a0 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/PreferenceRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/PreferenceRepository.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.component.preferences.domain import fr.outadoc.justchatting.component.preferences.data.AppPreferences import kotlinx.coroutines.flow.Flow -interface PreferenceRepository { +internal interface PreferenceRepository { val currentPreferences: Flow suspend fun updatePreferences(update: (AppPreferences) -> AppPreferences) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/BttvEmotesApi.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/BttvEmotesApi.kt index cecc886dd..b85fa41ce 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/BttvEmotesApi.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/BttvEmotesApi.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.twitch.http.model.BttvChannelResponse import fr.outadoc.justchatting.component.twitch.http.model.BttvEmote import fr.outadoc.justchatting.component.twitch.http.model.FfzEmote -interface BttvEmotesApi { +internal interface BttvEmotesApi { suspend fun getGlobalBttvEmotes(): Result> diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/IdApi.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/IdApi.kt index 10bedce1e..3736fb672 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/IdApi.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/IdApi.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.twitch.http.api import fr.outadoc.justchatting.component.twitch.http.model.ValidationResponse -interface IdApi { +internal interface IdApi { suspend fun validateToken(token: String): Result suspend fun revokeToken(clientId: String, token: String): Result } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/StvEmotesApi.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/StvEmotesApi.kt index a881ca465..74ffec9df 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/StvEmotesApi.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/StvEmotesApi.kt @@ -2,6 +2,6 @@ package fr.outadoc.justchatting.component.twitch.http.api import fr.outadoc.justchatting.component.twitch.http.model.StvEmoteResponse -interface StvEmotesApi { +internal interface StvEmotesApi { suspend fun getGlobalStvEmotes(): Result } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/TwitchApi.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/TwitchApi.kt index 50f1e9c39..65dfbfc45 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/TwitchApi.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/api/TwitchApi.kt @@ -9,7 +9,7 @@ import fr.outadoc.justchatting.component.twitch.http.model.StreamsResponse import fr.outadoc.justchatting.component.twitch.http.model.TwitchBadgesResponse import fr.outadoc.justchatting.component.twitch.http.model.UsersResponse -interface TwitchApi { +internal interface TwitchApi { suspend fun getStreams(ids: List): Result diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvChannelResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvChannelResponse.kt index 5b73d3dfe..1c5fbe8f7 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvChannelResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvChannelResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class BttvChannelResponse( +internal data class BttvChannelResponse( @SerialName("channelEmotes") val channelEmotes: List, @SerialName("sharedEmotes") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvEmote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvEmote.kt index 7200bdf42..253c9a359 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvEmote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/BttvEmote.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class BttvEmote( +internal data class BttvEmote( @SerialName("id") val id: String, @SerialName("code") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelFollow.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelFollow.kt index 97dee2788..5012ec11b 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelFollow.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelFollow.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable @Parcelize @Serializable -data class ChannelFollow( +internal data class ChannelFollow( @SerialName("broadcaster_id") val userId: String, @SerialName("broadcaster_login") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSchedule.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSchedule.kt index 497a0d8dd..a44bffcfe 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSchedule.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSchedule.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class ChannelSchedule( +internal data class ChannelSchedule( @SerialName("segments") val segments: List, @SerialName("broadcaster_id") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleResponse.kt index 512c45eab..c11793a2a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class ChannelScheduleResponse( +internal data class ChannelScheduleResponse( @SerialName("data") val data: ChannelSchedule, @SerialName("pagination") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleSegment.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleSegment.kt index 2dce79d54..44034d1a5 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleSegment.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleSegment.kt @@ -6,7 +6,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class ChannelScheduleSegment( +internal data class ChannelScheduleSegment( @SerialName("id") val id: String, @SerialName("start_time") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleVacation.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleVacation.kt index d36a97cd4..7c91e7cb8 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleVacation.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelScheduleVacation.kt @@ -6,7 +6,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class ChannelScheduleVacation( +internal data class ChannelScheduleVacation( @SerialName("start_time") @Serializable(with = InstantIso8601Serializer::class) val startTime: Instant, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearch.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearch.kt index 21864163b..e3770a7bc 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearch.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearch.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable @Parcelize @Serializable -data class ChannelSearch( +internal data class ChannelSearch( @SerialName("id") val id: String, @SerialName("title") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearchResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearchResponse.kt index 101fd8791..6491c2ade 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearchResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ChannelSearchResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class ChannelSearchResponse( +internal data class ChannelSearchResponse( @SerialName("data") val data: List, @SerialName("pagination") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmote.kt index 6473e73ec..483ca0a7d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmote.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class CheerEmote( +internal data class CheerEmote( @SerialName("prefix") val prefix: String, @SerialName("tiers") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmoteTier.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmoteTier.kt index a8bc55864..6e452df92 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmoteTier.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmoteTier.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class CheerEmoteTier( +internal data class CheerEmoteTier( @SerialName("id") val id: String, @SerialName("min_bits") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmotesResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmotesResponse.kt index c26dcaf87..58dbc0121 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmotesResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/CheerEmotesResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class CheerEmotesResponse( +internal data class CheerEmotesResponse( @SerialName("data") val data: List, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/EmoteSetResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/EmoteSetResponse.kt index 442733e33..684db2d10 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/EmoteSetResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/EmoteSetResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class EmoteSetResponse( +internal data class EmoteSetResponse( @SerialName("template") val template: String, @SerialName("data") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FfzEmote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FfzEmote.kt index a137395e9..4392821b7 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FfzEmote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FfzEmote.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class FfzEmote( +internal data class FfzEmote( @SerialName("id") val id: Int, @SerialName("code") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FollowResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FollowResponse.kt index 1326799a1..7cd7e1d23 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FollowResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/FollowResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class FollowResponse( +internal data class FollowResponse( @SerialName("total") val total: Int, @SerialName("data") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Pagination.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Pagination.kt index 6e8841539..e059ff8f5 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Pagination.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Pagination.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class Pagination( +internal data class Pagination( @SerialName("cursor") val cursor: String? = null, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Reward.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Reward.kt index dd47e31bf..d57f58d2e 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Reward.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Reward.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class Reward( +internal data class Reward( @SerialName("id") val id: String, @SerialName("title") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Stream.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Stream.kt index f80e11129..f81b48d42 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Stream.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Stream.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable @Parcelize @Serializable -data class Stream( +internal data class Stream( @SerialName("id") val id: String, @SerialName("user_id") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamCategory.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamCategory.kt index 6f8596c96..5c0918fe8 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamCategory.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamCategory.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class StreamCategory( +internal data class StreamCategory( @SerialName("id") val id: String, @SerialName("name") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamsResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamsResponse.kt index 49f9c4e4f..4dc8a4a3d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamsResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StreamsResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class StreamsResponse( +internal data class StreamsResponse( @SerialName("data") val data: List, @SerialName("pagination") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmote.kt index 842b3a300..996f0d63d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmote.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class StvEmote( +internal data class StvEmote( @SerialName("id") val id: String, @SerialName("name") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteData.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteData.kt index bc8928173..262833d9a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteData.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteData.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class StvEmoteData( +internal data class StvEmoteData( @SerialName("animated") val animated: Boolean, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteResponse.kt index dcc394084..5635f82cc 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/StvEmoteResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class StvEmoteResponse( +internal data class StvEmoteResponse( @SerialName("emotes") val emotes: List, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Subscription.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Subscription.kt index ef2e055ed..76b0fa948 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Subscription.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/Subscription.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class Subscription( +internal data class Subscription( @SerialName("type") val type: String, @SerialName("version") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeSet.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeSet.kt index 23bc15b0d..238d51904 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeSet.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeSet.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class TwitchBadgeSet( +internal data class TwitchBadgeSet( @SerialName("set_id") val setId: String, @SerialName("versions") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeVersion.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeVersion.kt index ef6f7880f..50d74c138 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeVersion.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgeVersion.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class TwitchBadgeVersion( +internal data class TwitchBadgeVersion( @SerialName("id") val id: String, @SerialName("title") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgesResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgesResponse.kt index 512be202e..08c6e15dc 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgesResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchBadgesResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class TwitchBadgesResponse( +internal data class TwitchBadgesResponse( @SerialName("data") val badgeSets: List, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchEmote.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchEmote.kt index 7f0c0e7c9..f24590949 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchEmote.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/TwitchEmote.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class TwitchEmote( +internal data class TwitchEmote( @SerialName("id") val id: String, @SerialName("name") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/User.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/User.kt index b072104bc..1b8ab66e7 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/User.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/User.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable @Parcelize @Serializable -data class User( +internal data class User( @SerialName("id") val id: String, @SerialName("login") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/UsersResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/UsersResponse.kt index 882a939e6..b35644865 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/UsersResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/UsersResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class UsersResponse( +internal data class UsersResponse( @SerialName("data") val data: List, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ValidationResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ValidationResponse.kt index 58df24d0f..718b0bab3 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ValidationResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/model/ValidationResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -class ValidationResponse( +internal class ValidationResponse( @SerialName("client_id") val clientId: String, @SerialName("login") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/BttvEmotesServer.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/BttvEmotesServer.kt index 8da694522..218394d34 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/BttvEmotesServer.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/BttvEmotesServer.kt @@ -10,7 +10,7 @@ import io.ktor.client.plugins.defaultRequest import io.ktor.client.request.get import io.ktor.http.path -class BttvEmotesServer(httpClient: HttpClient) : BttvEmotesApi { +internal class BttvEmotesServer(httpClient: HttpClient) : BttvEmotesApi { private val client = httpClient.config { defaultRequest { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/IdServer.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/IdServer.kt index 2378ed283..1ccfbbbcc 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/IdServer.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/IdServer.kt @@ -11,7 +11,7 @@ import io.ktor.client.request.parameter import io.ktor.client.request.post import io.ktor.http.path -class IdServer(httpClient: HttpClient) : IdApi { +internal class IdServer(httpClient: HttpClient) : IdApi { private val client = httpClient.config { defaultRequest { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/StvEmotesServer.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/StvEmotesServer.kt index 03659772b..5d2d1e2d9 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/StvEmotesServer.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/StvEmotesServer.kt @@ -8,7 +8,7 @@ import io.ktor.client.plugins.defaultRequest import io.ktor.client.request.get import io.ktor.http.path -class StvEmotesServer(httpClient: HttpClient) : StvEmotesApi { +internal class StvEmotesServer(httpClient: HttpClient) : StvEmotesApi { private val client = httpClient.config { defaultRequest { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/TwitchServer.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/TwitchServer.kt index dc323fa80..ce8dff589 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/TwitchServer.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/http/server/TwitchServer.kt @@ -16,7 +16,7 @@ import io.ktor.client.request.get import io.ktor.client.request.parameter import io.ktor.http.path -class TwitchServer(httpClient: HttpClient) : TwitchApi { +internal class TwitchServer(httpClient: HttpClient) : TwitchApi { private val client = httpClient.config { defaultRequest { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/BttvEmoteExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/BttvEmoteExt.kt index af62ae017..e022ea5c2 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/BttvEmoteExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/BttvEmoteExt.kt @@ -21,7 +21,7 @@ private val availableDensities = mapOf( 3.0f to "3x", ) -fun BttvEmote.map(): Emote { +internal fun BttvEmote.map(): Emote { return Emote( name = code, ownerId = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/CheerEmoteExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/CheerEmoteExt.kt index 0d27bbe00..7b4c59c39 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/CheerEmoteExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/CheerEmoteExt.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.Emote import fr.outadoc.justchatting.component.chatapi.common.EmoteUrls import fr.outadoc.justchatting.component.twitch.http.model.CheerEmoteTier -fun CheerEmoteTier.map(prefix: String): Emote { +internal fun CheerEmoteTier.map(prefix: String): Emote { return Emote( name = "${prefix}$id", bitsValue = minBits, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/FfzEmoteExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/FfzEmoteExt.kt index a66334770..7efe7f45e 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/FfzEmoteExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/FfzEmoteExt.kt @@ -6,7 +6,7 @@ import fr.outadoc.justchatting.component.twitch.http.model.FfzEmote import fr.outadoc.justchatting.utils.core.filterKeysNotNull import fr.outadoc.justchatting.utils.core.filterValuesNotNull -fun FfzEmote.map(): Emote { +internal fun FfzEmote.map(): Emote { return Emote( name = code, ownerId = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/StvEmoteExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/StvEmoteExt.kt index 777b32fe4..72d2c9707 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/StvEmoteExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/StvEmoteExt.kt @@ -8,7 +8,7 @@ import fr.outadoc.justchatting.component.twitch.http.model.StvEmote private const val BASE_URL = "https://cdn.7tv.app/emote/" private const val FLAG_IS_ZERO_WIDTH = 1 shl 8 -fun StvEmote.map(): Emote { +internal fun StvEmote.map(): Emote { return Emote( name = name, ownerId = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/TwitchEmoteExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/TwitchEmoteExt.kt index 438ae488a..ce394e6a1 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/TwitchEmoteExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/utils/TwitchEmoteExt.kt @@ -24,7 +24,7 @@ private fun createUrlForEmote( .replace("{{scale}}", scale) } -fun TwitchEmote.map(templateUrl: String): Emote { +internal fun TwitchEmote.map(templateUrl: String): Emote { return Emote( name = name, ownerId = ownerId, @@ -50,7 +50,7 @@ fun TwitchEmote.map(templateUrl: String): Emote { ) } -fun ChatEmote.map(): Emote { +internal fun ChatEmote.map(): Emote { return Emote( name = name, ownerId = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/IrcMessageMapper.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/IrcMessageMapper.kt index 5980b3520..2b8772384 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/IrcMessageMapper.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/IrcMessageMapper.kt @@ -15,7 +15,7 @@ import fr.outadoc.justchatting.utils.core.formatNumber import io.fluidsonic.currency.Currency import kotlinx.collections.immutable.toImmutableList -class IrcMessageMapper { +internal class IrcMessageMapper { fun mapMessage(ircEvent: IrcEvent.Message): ChatEvent = with(ircEvent) { when (this) { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LiveChatWebSocket.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LiveChatWebSocket.kt index a1d9ff2ad..160ecba3a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LiveChatWebSocket.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LiveChatWebSocket.kt @@ -52,7 +52,7 @@ import kotlin.time.Duration.Companion.seconds * Maintains a websocket connection to the IRC Twitch chat and notifies of all messages * and commands, except NOTICE and USERSTATE which are handled by [LoggedInChatWebSocket]. */ -class LiveChatWebSocket private constructor( +internal class LiveChatWebSocket private constructor( networkStateObserver: NetworkStateObserver, private val scope: CoroutineScope, private val clock: Clock, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LoggedInChatWebSocket.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LoggedInChatWebSocket.kt index 6cbc649fd..9b7527c96 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LoggedInChatWebSocket.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/LoggedInChatWebSocket.kt @@ -50,7 +50,7 @@ import kotlin.time.Duration.Companion.seconds * * Use this class to write messages to the chat. */ -class LoggedInChatWebSocket( +internal class LoggedInChatWebSocket( networkStateObserver: NetworkStateObserver, private val scope: CoroutineScope, private val clock: Clock, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/MockChatWebSocket.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/MockChatWebSocket.kt index c2ff4a409..045b335e8 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/MockChatWebSocket.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/MockChatWebSocket.kt @@ -45,7 +45,7 @@ import kotlin.time.Duration.Companion.seconds * Mock chat web socket. Connects to a mock server to be able to simulate chat events. * See https://fdgt.dev */ -class MockChatWebSocket private constructor( +internal class MockChatWebSocket private constructor( networkStateObserver: NetworkStateObserver, private val scope: CoroutineScope, private val clock: Clock, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/TwitchIrcCommandParser.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/TwitchIrcCommandParser.kt index 68e655afa..0168dacf9 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/TwitchIrcCommandParser.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/TwitchIrcCommandParser.kt @@ -8,7 +8,7 @@ import fr.outadoc.justchatting.component.twitch.websocket.irc.model.IrcEvent import fr.outadoc.justchatting.utils.logging.logWarning import kotlinx.datetime.Clock -class TwitchIrcCommandParser(private val clock: Clock) { +internal class TwitchIrcCommandParser(private val clock: Clock) { fun parse(message: String): IrcEvent? { val ircMessage = IrcMessageParser.parse(message) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/model/IrcEvent.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/model/IrcEvent.kt index f965fdc21..8289a8e37 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/model/IrcEvent.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/model/IrcEvent.kt @@ -6,7 +6,7 @@ import fr.outadoc.justchatting.component.chatapi.common.Emote import kotlinx.datetime.Instant import kotlin.time.Duration -sealed interface IrcEvent { +internal sealed interface IrcEvent { sealed interface Message : IrcEvent { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesApi.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesApi.kt index c05551312..8f6e8ee22 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesApi.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesApi.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.component.twitch.websocket.irc.recent -interface RecentMessagesApi { +internal interface RecentMessagesApi { suspend fun getRecentMessages(channelLogin: String, limit: Int): Result } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesRepository.kt index 6861224fe..738283a53 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesRepository.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.twitch.websocket.irc.model.IrcEvent import fr.outadoc.justchatting.utils.core.DispatchersProvider import kotlinx.coroutines.withContext -class RecentMessagesRepository( +internal class RecentMessagesRepository( private val recentMessagesApi: RecentMessagesApi, private val parser: TwitchIrcCommandParser, ) { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesResponse.kt index 19aa37b20..b3c3e7018 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class RecentMessagesResponse( +internal data class RecentMessagesResponse( @SerialName("messages") val messages: List, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesServer.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesServer.kt index 5477bbe95..b39359168 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesServer.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/irc/recent/RecentMessagesServer.kt @@ -7,7 +7,7 @@ import io.ktor.client.request.get import io.ktor.client.request.parameter import io.ktor.http.path -class RecentMessagesServer(httpClient: HttpClient) : RecentMessagesApi { +internal class RecentMessagesServer(httpClient: HttpClient) : RecentMessagesApi { private val client = httpClient.config { defaultRequest { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/PubSubWebSocket.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/PubSubWebSocket.kt index b8473f823..32a9ee3e0 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/PubSubWebSocket.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/PubSubWebSocket.kt @@ -41,7 +41,7 @@ import kotlinx.coroutines.launch import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds -class PubSubWebSocket( +internal class PubSubWebSocket( private val networkStateObserver: NetworkStateObserver, private val scope: CoroutineScope, private val httpClient: HttpClient, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubClientMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubClientMessage.kt index a1e97e8bf..01ad289e6 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubClientMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubClientMessage.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -sealed class PubSubClientMessage { +internal sealed class PubSubClientMessage { @Serializable @SerialName("LISTEN") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubServerMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubServerMessage.kt index c06db6701..d7dc28d13 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubServerMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/client/model/PubSubServerMessage.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -sealed class PubSubServerMessage { +internal sealed class PubSubServerMessage { @Serializable @SerialName("RESPONSE") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/broadcastsettingsupdate/PubSubBroadcastSettingsPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/broadcastsettingsupdate/PubSubBroadcastSettingsPlugin.kt index a2bddf6a9..3806d57fa 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/broadcastsettingsupdate/PubSubBroadcastSettingsPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/broadcastsettingsupdate/PubSubBroadcastSettingsPlugin.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPlugin import kotlinx.serialization.json.Json -class PubSubBroadcastSettingsPlugin( +internal class PubSubBroadcastSettingsPlugin( private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubChannelPointsPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubChannelPointsPlugin.kt index ba10b6cd5..c9f4b2a21 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubChannelPointsPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubChannelPointsPlugin.kt @@ -8,7 +8,7 @@ import fr.outadoc.justchatting.shared.MR import kotlinx.datetime.Clock import kotlinx.serialization.json.Json -class PubSubChannelPointsPlugin( +internal class PubSubChannelPointsPlugin( private val clock: Clock, private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubRewardMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubRewardMessage.kt index f353a65e8..41ca86fbf 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubRewardMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/channelpoints/PubSubRewardMessage.kt @@ -8,7 +8,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -sealed class PubSubRewardMessage { +internal sealed class PubSubRewardMessage { @Serializable @SerialName("reward-redeemed") data class Redeemed( diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/pinnedmessage/PubSubPinnedMessagePlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/pinnedmessage/PubSubPinnedMessagePlugin.kt index d4db2c4b0..0c24d4ad0 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/pinnedmessage/PubSubPinnedMessagePlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/pinnedmessage/PubSubPinnedMessagePlugin.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPlugin import kotlinx.serialization.json.Json -class PubSubPinnedMessagePlugin( +internal class PubSubPinnedMessagePlugin( private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/poll/PubSubPollPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/poll/PubSubPollPlugin.kt index bc796cbe4..95a4216cd 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/poll/PubSubPollPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/poll/PubSubPollPlugin.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPlugin import kotlinx.serialization.json.Json -class PubSubPollPlugin( +internal class PubSubPollPlugin( private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/prediction/PubSubPredictionPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/prediction/PubSubPredictionPlugin.kt index b238a6af7..75bd05c08 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/prediction/PubSubPredictionPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/prediction/PubSubPredictionPlugin.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPlugin import kotlinx.serialization.json.Json -class PubSubPredictionPlugin( +internal class PubSubPredictionPlugin( private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/raid/PubSubRaidPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/raid/PubSubRaidPlugin.kt index e3e216f38..84997c263 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/raid/PubSubRaidPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/raid/PubSubRaidPlugin.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPlugin import kotlinx.serialization.json.Json -class PubSubRaidPlugin( +internal class PubSubRaidPlugin( private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedExt.kt index 222706908..21d6d822b 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedExt.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.twitch.websocket.pubsub.feature.richem import fr.outadoc.justchatting.component.chatapi.common.ChatEvent -fun PubSubRichEmbedMessage.RichEmbed.Data.map(): ChatEvent.RichEmbed = +internal fun PubSubRichEmbedMessage.RichEmbed.Data.map(): ChatEvent.RichEmbed = ChatEvent.RichEmbed( messageId = messageId, title = title, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedMessage.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedMessage.kt index 3670a6b70..cf430dd54 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedMessage.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedMessage.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -sealed class PubSubRichEmbedMessage { +internal sealed class PubSubRichEmbedMessage { @Serializable @SerialName("chat_rich_embed") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedPlugin.kt index d7aa36e9d..b546164e7 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/richembed/PubSubRichEmbedPlugin.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPlugin import kotlinx.serialization.json.Json -class PubSubRichEmbedPlugin( +internal class PubSubRichEmbedPlugin( private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/viewercount/PubSubViewerCountPlugin.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/viewercount/PubSubViewerCountPlugin.kt index 564b30780..bfd9091c0 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/viewercount/PubSubViewerCountPlugin.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/component/twitch/websocket/pubsub/feature/viewercount/PubSubViewerCountPlugin.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.pubsub.PubSubPlugin import kotlinx.serialization.json.Json -class PubSubViewerCountPlugin( +internal class PubSubViewerCountPlugin( private val json: Json, ) : PubSubPlugin { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/CachedEmoteListSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/CachedEmoteListSource.kt index 6a3e07cc5..68f884fa4 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/CachedEmoteListSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/CachedEmoteListSource.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.feature.chat.data.emotes -abstract class CachedEmoteListSource : EmoteListSource { +internal abstract class CachedEmoteListSource : EmoteListSource { data class Params( val channelId: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelBttvEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelBttvEmotesSource.kt index ebf9b06f0..6d6619799 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelBttvEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelBttvEmotesSource.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.repository.EmotesReposit import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.core.flatListOf -class ChannelBttvEmotesSource( +internal class ChannelBttvEmotesSource( private val emotesRepository: EmotesRepository, ) : CachedEmoteListSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelFfzEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelFfzEmotesSource.kt index 0244a0525..c62104599 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelFfzEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelFfzEmotesSource.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.repository.EmotesReposit import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.core.flatListOf -class ChannelFfzEmotesSource( +internal class ChannelFfzEmotesSource( private val emotesRepository: EmotesRepository, ) : CachedEmoteListSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelTwitchEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelTwitchEmotesSource.kt index 1f1f607f4..e8eae7752 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelTwitchEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/ChannelTwitchEmotesSource.kt @@ -4,7 +4,7 @@ import dev.icerock.moko.resources.desc.desc import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.core.flatListOf -class ChannelTwitchEmotesSource( +internal class ChannelTwitchEmotesSource( private val delegateTwitchEmotesSource: DelegateTwitchEmotesSource, ) : CachedEmoteListSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/DelegateTwitchEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/DelegateTwitchEmotesSource.kt index f3dea2168..7b4440665 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/DelegateTwitchEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/DelegateTwitchEmotesSource.kt @@ -8,7 +8,7 @@ import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.coroutineScope -class DelegateTwitchEmotesSource( +internal class DelegateTwitchEmotesSource( private val twitchRepository: TwitchRepository, ) : CachedEmoteListSource() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSource.kt index b6d570737..a9bafb0c2 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSource.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.feature.chat.data.emotes -interface EmoteListSource { +internal interface EmoteListSource { suspend fun getEmotes( channelId: String, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSourcesProvider.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSourcesProvider.kt index b6ae87898..318ec5528 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSourcesProvider.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteListSourcesProvider.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.feature.chat.data.emotes -fun interface EmoteListSourcesProvider { +internal fun interface EmoteListSourcesProvider { fun getSources(): List>> } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteSetItem.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteSetItem.kt index 6d6c956f1..a12b2e918 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteSetItem.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/EmoteSetItem.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.feature.chat.data.emotes import dev.icerock.moko.resources.desc.StringDesc -sealed class EmoteSetItem { +internal sealed class EmoteSetItem { data class Header( val title: StringDesc?, val source: StringDesc?, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalBttvEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalBttvEmotesSource.kt index b806286f0..a05eb6898 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalBttvEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalBttvEmotesSource.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.repository.EmotesReposit import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.core.flatListOf -class GlobalBttvEmotesSource( +internal class GlobalBttvEmotesSource( private val emotesRepository: EmotesRepository, ) : CachedEmoteListSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalFfzEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalFfzEmotesSource.kt index c4dc87457..852d6e796 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalFfzEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalFfzEmotesSource.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.repository.EmotesReposit import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.core.flatListOf -class GlobalFfzEmotesSource( +internal class GlobalFfzEmotesSource( private val emotesRepository: EmotesRepository, ) : CachedEmoteListSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalStvEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalStvEmotesSource.kt index 2d4ba2a31..bf575cb20 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalStvEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalStvEmotesSource.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.chatapi.domain.repository.EmotesReposit import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.core.flatListOf -class GlobalStvEmotesSource( +internal class GlobalStvEmotesSource( private val emotesRepository: EmotesRepository, ) : CachedEmoteListSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalTwitchEmotesSource.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalTwitchEmotesSource.kt index 2866e5b92..145c32ccf 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalTwitchEmotesSource.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/data/emotes/GlobalTwitchEmotesSource.kt @@ -4,7 +4,7 @@ import dev.icerock.moko.resources.desc.desc import fr.outadoc.justchatting.shared.MR import fr.outadoc.justchatting.utils.core.flatListOf -class GlobalTwitchEmotesSource( +internal class GlobalTwitchEmotesSource( private val delegateTwitchEmotesSource: DelegateTwitchEmotesSource, ) : CachedEmoteListSource>() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/AggregateChatEventHandler.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/AggregateChatEventHandler.kt index de5686deb..7709c2bd2 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/AggregateChatEventHandler.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/AggregateChatEventHandler.kt @@ -13,7 +13,7 @@ import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.merge import kotlinx.coroutines.flow.stateIn -class AggregateChatEventHandler( +internal class AggregateChatEventHandler( channelId: String, channelLogin: String, coroutineScope: CoroutineScope, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/ChatRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/ChatRepository.kt index 410b6e1a3..0b6005514 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/ChatRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/ChatRepository.kt @@ -4,7 +4,7 @@ import fr.outadoc.justchatting.component.chatapi.common.ChatEvent import fr.outadoc.justchatting.component.chatapi.common.ConnectionStatus import kotlinx.coroutines.flow.Flow -interface ChatRepository { +internal interface ChatRepository { val connectionStatus: Flow diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/DefaultChatRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/DefaultChatRepository.kt index a5cc0d23f..3c1030d72 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/DefaultChatRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/domain/DefaultChatRepository.kt @@ -13,7 +13,7 @@ import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.update -class DefaultChatRepository( +internal class DefaultChatRepository( private val factory: AggregateChatEventHandler.Factory, ) : ChatRepository { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/AutoCompleteItem.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/AutoCompleteItem.kt index 70b6ff9f0..66c28ea1d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/AutoCompleteItem.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/AutoCompleteItem.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.feature.chat.presentation import fr.outadoc.justchatting.component.chatapi.common.Chatter -sealed class AutoCompleteItem { +internal sealed class AutoCompleteItem { data class User(val chatter: Chatter) : AutoCompleteItem() data class Emote(val emote: fr.outadoc.justchatting.component.chatapi.common.Emote) : AutoCompleteItem() } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatPrefixConstants.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatPrefixConstants.kt index c6b1fe70d..b68e3cf05 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatPrefixConstants.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatPrefixConstants.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.feature.chat.presentation -object ChatPrefixConstants { +internal object ChatPrefixConstants { const val EmotePrefix = ':' const val ChatterPrefix = '@' } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatViewModel.kt index e2a8fe642..640ece42d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/ChatViewModel.kt @@ -80,7 +80,7 @@ import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds @OptIn(ExperimentalCoroutinesApi::class, FlowPreview::class) -class ChatViewModel( +internal class ChatViewModel( private val clock: Clock, private val twitchRepository: TwitchRepository, private val emotesRepository: EmotesRepository, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CreateShortcutForChannelUseCase.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CreateShortcutForChannelUseCase.kt index 754663277..04e993a7a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CreateShortcutForChannelUseCase.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/CreateShortcutForChannelUseCase.kt @@ -2,6 +2,6 @@ package fr.outadoc.justchatting.feature.chat.presentation import fr.outadoc.justchatting.component.chatapi.domain.model.User -interface CreateShortcutForChannelUseCase { +internal interface CreateShortcutForChannelUseCase { operator fun invoke(user: User) } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/EmoteUrlsExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/EmoteUrlsExt.kt index 6dffa31bd..5437d5b8a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/EmoteUrlsExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/EmoteUrlsExt.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.feature.chat.presentation import fr.outadoc.justchatting.component.chatapi.common.EmoteUrls -fun EmoteUrls.getBestUrl(screenDensity: Float, isDarkTheme: Boolean): String { +internal fun EmoteUrls.getBestUrl(screenDensity: Float, isDarkTheme: Boolean): String { return (if (isDarkTheme) dark else light) .minByOrNull { (density, _) -> screenDensity - density } ?.value diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCase.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCase.kt index 096eb018c..fc419c97b 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCase.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/FilterAutocompleteItemsUseCase.kt @@ -5,7 +5,7 @@ import fr.outadoc.justchatting.component.chatapi.common.Emote import kotlinx.collections.immutable.ImmutableMap import kotlinx.collections.immutable.PersistentSet -class FilterAutocompleteItemsUseCase { +internal class FilterAutocompleteItemsUseCase { operator fun invoke( filter: CharSequence, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/MessagePostConstraint.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/MessagePostConstraint.kt index 13e991e8d..775940007 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/MessagePostConstraint.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/MessagePostConstraint.kt @@ -5,7 +5,7 @@ import kotlinx.datetime.Instant import kotlin.time.Duration @Immutable -data class MessagePostConstraint( +internal data class MessagePostConstraint( val lastMessageSentAt: Instant, val slowModeDuration: Duration, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/NoopCreateShortcutForChannelUseCase.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/NoopCreateShortcutForChannelUseCase.kt index 57a14276c..b4a62a6f3 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/NoopCreateShortcutForChannelUseCase.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/NoopCreateShortcutForChannelUseCase.kt @@ -2,6 +2,6 @@ package fr.outadoc.justchatting.feature.chat.presentation import fr.outadoc.justchatting.component.chatapi.domain.model.User -class NoopCreateShortcutForChannelUseCase : CreateShortcutForChannelUseCase { +internal class NoopCreateShortcutForChannelUseCase : CreateShortcutForChannelUseCase { override fun invoke(user: User) {} } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/OngoingEvents.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/OngoingEvents.kt index 88f5a07e6..42ffe7121 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/OngoingEvents.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/OngoingEvents.kt @@ -6,7 +6,7 @@ import fr.outadoc.justchatting.component.chatapi.common.Prediction import fr.outadoc.justchatting.component.chatapi.common.Raid import kotlinx.datetime.Instant -data class OngoingEvents( +internal data class OngoingEvents( val poll: Poll? = null, val prediction: Prediction? = null, val pinnedMessage: PinnedMessage? = null, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/RoomState.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/RoomState.kt index 0de3164b4..5a6010150 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/RoomState.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/RoomState.kt @@ -5,7 +5,7 @@ import kotlin.time.Duration import kotlin.time.Duration.Companion.minutes @Immutable -data class RoomState( +internal data class RoomState( val isEmoteOnly: Boolean = false, val minFollowDuration: Duration = (-1).minutes, val uniqueMessagesOnly: Boolean = false, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/StreamAndUserInfoViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/StreamAndUserInfoViewModel.kt index 844a92bfc..62c85dadc 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/StreamAndUserInfoViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/StreamAndUserInfoViewModel.kt @@ -9,7 +9,7 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch -class StreamAndUserInfoViewModel( +internal class StreamAndUserInfoViewModel( private val twitchRepository: TwitchRepository, ) : ViewModel() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/TestEvents.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/TestEvents.kt index 02561d137..4282c650c 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/TestEvents.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/chat/presentation/TestEvents.kt @@ -12,7 +12,7 @@ import kotlinx.datetime.Instant import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds -object TestEvents { +internal object TestEvents { val events: Flow = flowOf( ChatViewModel.Action.UpdatePrediction( diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/ChannelSearchViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/ChannelSearchViewModel.kt index 965e62b41..2a986e5bd 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/ChannelSearchViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/ChannelSearchViewModel.kt @@ -19,7 +19,7 @@ import kotlinx.coroutines.flow.mapNotNull import kotlinx.coroutines.flow.update import kotlin.time.Duration.Companion.seconds -class ChannelSearchViewModel( +internal class ChannelSearchViewModel( private val twitchRepository: TwitchRepository, ) : ViewModel() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedChannelsViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedChannelsViewModel.kt index 64d03e088..df0b279ae 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedChannelsViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedChannelsViewModel.kt @@ -12,7 +12,7 @@ import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.launch import kotlin.random.Random -class FollowedChannelsViewModel( +internal class FollowedChannelsViewModel( private val repository: TwitchRepository, ) : ViewModel() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedStreamsViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedStreamsViewModel.kt index 6fc9e41c4..95c09ca97 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedStreamsViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/FollowedStreamsViewModel.kt @@ -12,7 +12,7 @@ import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.launch import kotlin.random.Random -class FollowedStreamsViewModel( +internal class FollowedStreamsViewModel( private val repository: TwitchRepository, ) : ViewModel() { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/MainRouterViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/MainRouterViewModel.kt index b5bdb8036..92e96f37f 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/MainRouterViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/home/presentation/MainRouterViewModel.kt @@ -20,7 +20,7 @@ import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch import kotlin.time.Duration.Companion.seconds -class MainRouterViewModel( +internal class MainRouterViewModel( private val authRepository: AuthRepository, private val preferencesRepository: PreferenceRepository, private val deeplinkParser: DeeplinkParser, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/Dependency.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/Dependency.kt index 48ae6c878..f30db1adf 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/Dependency.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/Dependency.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class Dependency( +internal data class Dependency( @SerialName("moduleName") val moduleName: String, @SerialName("moduleUrl") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DependencyList.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DependencyList.kt index 365773aec..18ed3fe2a 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DependencyList.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/DependencyList.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class DependencyList( +internal data class DependencyList( @SerialName("dependencies") val dependencies: List, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogRepository.kt index d5c46aa03..24d729b31 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/LogRepository.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.feature.preferences.presentation -interface LogRepository { +internal interface LogRepository { val isSupported: Boolean suspend fun dumpLogs(): String } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopLogRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopLogRepository.kt index 8bb46f055..3319ccc6c 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopLogRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopLogRepository.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.feature.preferences.presentation -class NoopLogRepository : LogRepository { +internal class NoopLogRepository : LogRepository { override val isSupported: Boolean = false diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopReadExternalDependenciesList.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopReadExternalDependenciesList.kt index 6affe11a6..19b86a015 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopReadExternalDependenciesList.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/NoopReadExternalDependenciesList.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.feature.preferences.presentation -class NoopReadExternalDependenciesList : ReadExternalDependenciesList { +internal class NoopReadExternalDependenciesList : ReadExternalDependenciesList { override suspend fun invoke(): List = emptyList() } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/ReadExternalDependenciesList.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/ReadExternalDependenciesList.kt index fd426b9f4..0862c410b 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/ReadExternalDependenciesList.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/ReadExternalDependenciesList.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.feature.preferences.presentation -interface ReadExternalDependenciesList { +internal interface ReadExternalDependenciesList { suspend operator fun invoke(): List } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/SettingsViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/SettingsViewModel.kt index 0cee6edf8..d633d7698 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/SettingsViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/preferences/presentation/SettingsViewModel.kt @@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch -class SettingsViewModel( +internal class SettingsViewModel( private val preferenceRepository: PreferenceRepository, private val authRepository: AuthRepository, private val logRepository: LogRepository, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsApi.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsApi.kt index 3ced0254f..e7cb2ac3f 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsApi.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsApi.kt @@ -16,7 +16,7 @@ import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import kotlinx.coroutines.withContext -class AlejoPronounsApi( +internal class AlejoPronounsApi( private val alejoPronounsClient: AlejoPronounsClient, private val preferenceRepository: PreferenceRepository, ) : PronounsApi { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsClient.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsClient.kt index 98c34310e..c36cb6f41 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsClient.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/AlejoPronounsClient.kt @@ -8,7 +8,7 @@ import io.ktor.client.plugins.defaultRequest import io.ktor.client.request.get import io.ktor.http.path -class AlejoPronounsClient( +internal class AlejoPronounsClient( httpClient: HttpClient, ) { private val client = httpClient.config { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/AlejoPronoun.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/AlejoPronoun.kt index 5e15841ef..bcb951fa1 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/AlejoPronoun.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/AlejoPronoun.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class AlejoPronoun( +internal data class AlejoPronoun( @SerialName("name") val id: String, @SerialName("display") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/UserPronounResponse.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/UserPronounResponse.kt index 0901a3020..93831c0fd 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/UserPronounResponse.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/data/model/UserPronounResponse.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class UserPronounResponse( +internal data class UserPronounResponse( @SerialName("id") val id: String, @SerialName("login") diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsApi.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsApi.kt index a4bd4e4b6..a3cd646cf 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsApi.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsApi.kt @@ -3,6 +3,6 @@ package fr.outadoc.justchatting.feature.pronouns.domain import fr.outadoc.justchatting.component.chatapi.common.Chatter import fr.outadoc.justchatting.component.chatapi.common.Pronoun -interface PronounsApi { +internal interface PronounsApi { suspend fun fillPronounsFor(chatters: Set): Map } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsRepository.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsRepository.kt index d85d0cbc7..86ea306de 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsRepository.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/feature/pronouns/domain/PronounsRepository.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.feature.pronouns.domain import fr.outadoc.justchatting.component.chatapi.common.Chatter import fr.outadoc.justchatting.component.chatapi.common.Pronoun -class PronounsRepository( +internal class PronounsRepository( private val pronounsApi: PronounsApi, ) { suspend fun fillPronounsFor(chatters: Set): Map { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt index 1f8221769..ff8ff2ecd 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt @@ -5,7 +5,7 @@ import kotlinx.coroutines.CoroutineScope /** * https://proandroiddev.com/multiplatform-presenters-or-viewmodels-the-lean-way-cbb763c803af */ -expect abstract class ViewModel() { +internal expect abstract class ViewModel() { val viewModelScope: CoroutineScope protected open fun onCleared() } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/CoroutinesExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/CoroutinesExt.kt index e48e367e7..d36bfb4be 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/CoroutinesExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/CoroutinesExt.kt @@ -5,7 +5,7 @@ import kotlin.random.Random import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds -suspend fun delayWithJitter(delay: Duration, maxJitter: Duration) { +internal suspend fun delayWithJitter(delay: Duration, maxJitter: Duration) { val jitter = Random.nextLong(maxJitter.inWholeMilliseconds).milliseconds delay(delay + jitter) } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt index 6410ba250..02400a606 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.utils.core import kotlinx.coroutines.CoroutineDispatcher -expect object DispatchersProvider { +internal expect object DispatchersProvider { val main: CoroutineDispatcher val io: CoroutineDispatcher val default: CoroutineDispatcher diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/InstantUnixEpochSerializer.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/InstantUnixEpochSerializer.kt index c09fdf307..65beffd51 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/InstantUnixEpochSerializer.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/InstantUnixEpochSerializer.kt @@ -8,7 +8,7 @@ import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder -object InstantUnixEpochSerializer : KSerializer { +internal object InstantUnixEpochSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Instant", PrimitiveKind.LONG) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/JsonExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/JsonExt.kt index eaa783aa8..4318d4c81 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/JsonExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/JsonExt.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.utils.core import kotlinx.serialization.json.Json -val DefaultJson = Json { +internal val DefaultJson = Json { ignoreUnknownKeys = true encodeDefaults = true } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/ListExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/ListExt.kt index 0817ea9fe..9c9bd548c 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/ListExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/ListExt.kt @@ -1,6 +1,6 @@ package fr.outadoc.justchatting.utils.core -fun flatListOf(head: T, vararg lists: List): List { +internal fun flatListOf(head: T, vararg lists: List): List { val content = lists.flatMap { item -> item } return if (content.isNotEmpty()) listOf(head) + content else emptyList() } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/MapExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/MapExt.kt index 81a6466ff..c65b2fd6c 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/MapExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/MapExt.kt @@ -4,16 +4,16 @@ import kotlinx.collections.immutable.ImmutableMap import kotlinx.collections.immutable.toPersistentMap @Suppress("UNCHECKED_CAST") -fun Map.filterKeysNotNull(): Map { +internal fun Map.filterKeysNotNull(): Map { return filterKeys { key -> key != null } as Map } @Suppress("UNCHECKED_CAST") -fun Map.filterValuesNotNull(): Map { +internal fun Map.filterValuesNotNull(): Map { return filterValues { value -> value != null } as Map } @Suppress("UNCHECKED_CAST") -fun ImmutableMap.filterValuesNotNull(): ImmutableMap { +internal fun ImmutableMap.filterValuesNotNull(): ImmutableMap { return (filterValues { value -> value != null } as Map).toPersistentMap() } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NetworkStateObserver.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NetworkStateObserver.kt index 950c0b34b..f1223f643 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NetworkStateObserver.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NetworkStateObserver.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.utils.core import kotlinx.coroutines.flow.Flow -interface NetworkStateObserver { +internal interface NetworkStateObserver { val state: Flow diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NoopNetworkStateObserver.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NoopNetworkStateObserver.kt index 1eb26aaf2..87cf2f0c9 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NoopNetworkStateObserver.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NoopNetworkStateObserver.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.utils.core import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flowOf -class NoopNetworkStateObserver : NetworkStateObserver { +internal class NoopNetworkStateObserver : NetworkStateObserver { override val state: Flow = flowOf( NetworkStateObserver.NetworkState.Available, ) diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt index e5da19f60..af8895549 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt @@ -3,8 +3,8 @@ package fr.outadoc.justchatting.utils.core import com.ionspin.kotlin.bignum.decimal.BigDecimal import io.fluidsonic.currency.Currency -expect fun Float.formatPercent(): String +internal expect fun Float.formatPercent(): String -expect fun Int.formatNumber(): String +internal expect fun Int.formatNumber(): String -expect fun BigDecimal.formatCurrency(currency: Currency): String +internal expect fun BigDecimal.formatCurrency(currency: Currency): String diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberOddnessExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberOddnessExt.kt index 6b62b932a..977bb3e97 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberOddnessExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/core/NumberOddnessExt.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.utils.core -val Int.isOdd: Boolean get() = this % 2 == 1 +internal val Int.isOdd: Boolean get() = this % 2 == 1 -fun Int.roundUpOddToEven(): Int = if (isOdd) this + 1 else this +internal fun Int.roundUpOddToEven(): Int = if (isOdd) this + 1 else this diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/BaseHttpClientProvider.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/BaseHttpClientProvider.kt index 0167cc36c..4bb434e3d 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/BaseHttpClientProvider.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/BaseHttpClientProvider.kt @@ -3,6 +3,6 @@ package fr.outadoc.justchatting.utils.http import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig -interface BaseHttpClientProvider { +internal interface BaseHttpClientProvider { fun get(block: HttpClientConfig<*>.() -> Unit = {}): HttpClient } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/FrameLogger.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/FrameLogger.kt index 1e98515f6..0c3d0dcf2 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/FrameLogger.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/FrameLogger.kt @@ -8,7 +8,7 @@ import io.ktor.websocket.WebSocketExtensionFactory import io.ktor.websocket.WebSocketExtensionHeader import io.ktor.websocket.readText -class FrameLogger : WebSocketExtension { +internal class FrameLogger : WebSocketExtension { class Config diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/TwitchHttpClientProvider.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/TwitchHttpClientProvider.kt index 7bb42c9e4..470ed866e 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/TwitchHttpClientProvider.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/http/TwitchHttpClientProvider.kt @@ -11,7 +11,7 @@ import io.ktor.client.plugins.defaultRequest import io.ktor.client.request.header import kotlinx.coroutines.flow.first -class TwitchHttpClientProvider( +internal class TwitchHttpClientProvider( private val baseHttpClientProvider: BaseHttpClientProvider, private val preferenceRepository: PreferenceRepository, private val oAuthAppCredentials: OAuthAppCredentials, diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LogStrategy.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LogStrategy.kt index 9d0cd7f88..b8881b185 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LogStrategy.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LogStrategy.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.utils.logging -interface LogStrategy { - fun println(level: Logger.Level, tag: String?, content: String) +public interface LogStrategy { + public fun println(level: Logger.Level, tag: String?, content: String) } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/Logger.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/Logger.kt index 88cfe5fa8..a2e28b2ed 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/Logger.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/Logger.kt @@ -1,10 +1,10 @@ package fr.outadoc.justchatting.utils.logging -object Logger { +public object Logger { - var logStrategy: LogStrategy = NoopLogStrategy + public var logStrategy: LogStrategy = NoopLogStrategy - enum class Level(val tag: String) { + public enum class Level(internal val tag: String) { Verbose("V"), Debug("D"), Info("I"), @@ -12,7 +12,7 @@ object Logger { Error("E"), } - fun println(level: Level, tag: String, content: () -> String) { + internal fun println(level: Level, tag: String, content: () -> String) { logStrategy.println(level, tag, content()) } } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LoggerExt.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LoggerExt.kt index 37e53838d..9a3ae4a22 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LoggerExt.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/LoggerExt.kt @@ -1,18 +1,18 @@ package fr.outadoc.justchatting.utils.logging -inline fun logVerbose(noinline content: () -> String) = +internal inline fun logVerbose(noinline content: () -> String) = Logger.println(Logger.Level.Verbose, T::class.simpleName!!, content) -inline fun logDebug(noinline content: () -> String) = +internal inline fun logDebug(noinline content: () -> String) = Logger.println(Logger.Level.Debug, T::class.simpleName!!, content) -inline fun logInfo(noinline content: () -> String) = +internal inline fun logInfo(noinline content: () -> String) = Logger.println(Logger.Level.Info, T::class.simpleName!!, content) -inline fun logWarning(noinline content: () -> String) = +internal inline fun logWarning(noinline content: () -> String) = Logger.println(Logger.Level.Warning, T::class.simpleName!!, content) -inline fun logError( +internal inline fun logError( throwable: Throwable? = null, noinline content: () -> String, ) { diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/NoopLogStrategy.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/NoopLogStrategy.kt index 869cbe67f..24bf74d07 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/NoopLogStrategy.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/logging/NoopLogStrategy.kt @@ -1,5 +1,5 @@ package fr.outadoc.justchatting.utils.logging -object NoopLogStrategy : LogStrategy { +internal object NoopLogStrategy : LogStrategy { override fun println(level: Logger.Level, tag: String?, content: String) = Unit } diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt index 9877a0b2f..495882b80 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt @@ -1,3 +1,3 @@ package fr.outadoc.justchatting.utils.parcel -expect interface Parcelable +internal expect interface Parcelable diff --git a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelize.kt b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelize.kt index 7e9bd466b..e8728c194 100644 --- a/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelize.kt +++ b/shared/src/commonMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelize.kt @@ -1,3 +1,3 @@ package fr.outadoc.justchatting.utils.parcel -annotation class Parcelize +internal annotation class Parcelize diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/AppDatabaseProvider.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/AppDatabaseProvider.kt index cc774846a..4daa2e58c 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/AppDatabaseProvider.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/chatapi/db/AppDatabaseProvider.kt @@ -2,7 +2,7 @@ package fr.outadoc.justchatting.component.chatapi.db import app.cash.sqldelight.driver.native.NativeSqliteDriver -object AppDatabaseProvider { +internal object AppDatabaseProvider { fun get(): AppDatabase { return AppDatabase( diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/UserDefaultsPreferenceRepository.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/UserDefaultsPreferenceRepository.kt index 56de04ca5..25fd249b8 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/UserDefaultsPreferenceRepository.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/component/preferences/domain/UserDefaultsPreferenceRepository.kt @@ -9,7 +9,7 @@ import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import platform.Foundation.NSUserDefaults -class UserDefaultsPreferenceRepository : PreferenceRepository { +internal class UserDefaultsPreferenceRepository : PreferenceRepository { private val userDefaults = NSUserDefaults.standardUserDefaults private val defaultPreferences = AppPreferences() diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt index 295221d23..6d31a928d 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/lifecycle/ViewModel.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.lifecycle import kotlinx.coroutines.MainScope import kotlinx.coroutines.cancel -actual abstract class ViewModel { +internal actual abstract class ViewModel { actual val viewModelScope = MainScope() diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt index 513e705bf..c94697b66 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/DispatchersProvider.kt @@ -3,7 +3,7 @@ package fr.outadoc.justchatting.utils.core import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers -actual object DispatchersProvider { +internal actual object DispatchersProvider { actual val main: CoroutineDispatcher = Dispatchers.Main actual val io: CoroutineDispatcher = Dispatchers.Default actual val default: CoroutineDispatcher = Dispatchers.Default diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt index 1974993ef..4b4149eca 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/core/NumberExt.kt @@ -11,19 +11,19 @@ import platform.Foundation.NSNumberFormatterPercentStyle import platform.Foundation.currentLocale import platform.Foundation.localeIdentifier -actual fun Float.formatPercent(): String = +internal actual fun Float.formatPercent(): String = NSNumberFormatter.localizedStringFromNumber( NSNumber(this), NSNumberFormatterPercentStyle, ) -actual fun Int.formatNumber(): String = +internal actual fun Int.formatNumber(): String = NSNumberFormatter.localizedStringFromNumber( NSNumber(this), NSNumberFormatterDecimalStyle, ) -actual fun BigDecimal.formatCurrency(currency: Currency): String { +internal actual fun BigDecimal.formatCurrency(currency: Currency): String { val amount = NSNumber(this.floatValue(exactRequired = false)) val currentLocale = NSLocale.currentLocale().localeIdentifier() val formatter = NSNumberFormatter().apply { diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/http/AppleHttpClientProvider.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/http/AppleHttpClientProvider.kt index 1b9375e52..68c8f1132 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/http/AppleHttpClientProvider.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/http/AppleHttpClientProvider.kt @@ -14,7 +14,7 @@ import io.ktor.serialization.kotlinx.KotlinxWebsocketSerializationConverter import io.ktor.serialization.kotlinx.json.json import kotlinx.serialization.json.Json -class AppleHttpClientProvider( +internal class AppleHttpClientProvider( private val json: Json, ) : BaseHttpClientProvider { diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/logging/AppleLogStrategy.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/logging/AppleLogStrategy.kt index d91e01c3a..eb79bfda7 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/logging/AppleLogStrategy.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/logging/AppleLogStrategy.kt @@ -11,7 +11,7 @@ import platform.darwin.OS_LOG_TYPE_INFO import platform.darwin.__dso_handle import platform.darwin._os_log_internal -object AppleLogStrategy : LogStrategy { +internal object AppleLogStrategy : LogStrategy { @OptIn(ExperimentalForeignApi::class) override fun println(level: Logger.Level, tag: String?, content: String) { diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt index b1f5388fb..91eaf6955 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/parcel/Parcelable.kt @@ -1,3 +1,3 @@ package fr.outadoc.justchatting.utils.parcel -actual interface Parcelable +internal actual interface Parcelable diff --git a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/view/PagingCollectionViewController.kt b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/view/PagingCollectionViewController.kt index deb93b140..6ab09453e 100644 --- a/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/view/PagingCollectionViewController.kt +++ b/shared/src/iosMain/kotlin/fr/outadoc/justchatting/utils/view/PagingCollectionViewController.kt @@ -12,7 +12,7 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map // Making abstract causes the compilation error "Non-final Kotlin subclasses of Objective-C classes are not yet supported". -class PagingCollectionViewController { +internal class PagingCollectionViewController { private val mainDispatcher: CoroutineDispatcher = Dispatchers.Main private val workerDispatcher: CoroutineDispatcher = Dispatchers.Default