From 999c59e9ecf02c2595dbd6a01551cb2a83ba2e21 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Fri, 21 Oct 2022 20:31:29 +0200 Subject: [PATCH] Create a separate package for UI screens and state --- .../java/dev/lonami/talaria/ui/{ => screens}/ChatScreen.kt | 3 ++- .../java/dev/lonami/talaria/ui/{ => screens}/DialogScreen.kt | 3 ++- .../java/dev/lonami/talaria/ui/{ => screens}/LoginScreen.kt | 2 +- .../main/java/dev/lonami/talaria/ui/{ => state}/ChatUiState.kt | 2 +- .../java/dev/lonami/talaria/ui/{ => state}/ChatViewModel.kt | 2 +- .../java/dev/lonami/talaria/ui/{ => state}/DialogUiState.kt | 2 +- .../java/dev/lonami/talaria/ui/{ => state}/DialogViewModel.kt | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) rename app/src/main/java/dev/lonami/talaria/ui/{ => screens}/ChatScreen.kt (97%) rename app/src/main/java/dev/lonami/talaria/ui/{ => screens}/DialogScreen.kt (96%) rename app/src/main/java/dev/lonami/talaria/ui/{ => screens}/LoginScreen.kt (99%) rename app/src/main/java/dev/lonami/talaria/ui/{ => state}/ChatUiState.kt (76%) rename app/src/main/java/dev/lonami/talaria/ui/{ => state}/ChatViewModel.kt (96%) rename app/src/main/java/dev/lonami/talaria/ui/{ => state}/DialogUiState.kt (74%) rename app/src/main/java/dev/lonami/talaria/ui/{ => state}/DialogViewModel.kt (94%) diff --git a/app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt b/app/src/main/java/dev/lonami/talaria/ui/screens/ChatScreen.kt similarity index 97% rename from app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt rename to app/src/main/java/dev/lonami/talaria/ui/screens/ChatScreen.kt index dd9cbb2..d7ef413 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/screens/ChatScreen.kt @@ -1,4 +1,4 @@ -package dev.lonami.talaria.ui +package dev.lonami.talaria.ui.screens import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn @@ -20,6 +20,7 @@ import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import dev.lonami.talaria.R import dev.lonami.talaria.models.Message +import dev.lonami.talaria.ui.state.ChatViewModel import dev.lonami.talaria.ui.theme.TalariaTheme import kotlinx.coroutines.launch diff --git a/app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt b/app/src/main/java/dev/lonami/talaria/ui/screens/DialogScreen.kt similarity index 96% rename from app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt rename to app/src/main/java/dev/lonami/talaria/ui/screens/DialogScreen.kt index 31d03bb..d35598c 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/screens/DialogScreen.kt @@ -1,4 +1,4 @@ -package dev.lonami.talaria.ui +package dev.lonami.talaria.ui.screens import androidx.compose.foundation.Image import androidx.compose.foundation.clickable @@ -23,6 +23,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel import dev.lonami.talaria.R import dev.lonami.talaria.data.MockDialogRepository import dev.lonami.talaria.models.Dialog +import dev.lonami.talaria.ui.state.DialogViewModel import dev.lonami.talaria.ui.theme.TalariaTheme @Composable diff --git a/app/src/main/java/dev/lonami/talaria/ui/LoginScreen.kt b/app/src/main/java/dev/lonami/talaria/ui/screens/LoginScreen.kt similarity index 99% rename from app/src/main/java/dev/lonami/talaria/ui/LoginScreen.kt rename to app/src/main/java/dev/lonami/talaria/ui/screens/LoginScreen.kt index 26a1497..1890ab1 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/LoginScreen.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/screens/LoginScreen.kt @@ -1,4 +1,4 @@ -package dev.lonami.talaria.ui +package dev.lonami.talaria.ui.screens import androidx.compose.foundation.layout.* import androidx.compose.foundation.text.KeyboardActions diff --git a/app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt b/app/src/main/java/dev/lonami/talaria/ui/state/ChatUiState.kt similarity index 76% rename from app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt rename to app/src/main/java/dev/lonami/talaria/ui/state/ChatUiState.kt index 683851f..9aaa58d 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/state/ChatUiState.kt @@ -1,4 +1,4 @@ -package dev.lonami.talaria.ui +package dev.lonami.talaria.ui.state import dev.lonami.talaria.models.Message diff --git a/app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt b/app/src/main/java/dev/lonami/talaria/ui/state/ChatViewModel.kt similarity index 96% rename from app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt rename to app/src/main/java/dev/lonami/talaria/ui/state/ChatViewModel.kt index c27c008..cd77f4e 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/state/ChatViewModel.kt @@ -1,4 +1,4 @@ -package dev.lonami.talaria.ui +package dev.lonami.talaria.ui.state import androidx.lifecycle.ViewModel import dev.lonami.talaria.bindings.Native diff --git a/app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt b/app/src/main/java/dev/lonami/talaria/ui/state/DialogUiState.kt similarity index 74% rename from app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt rename to app/src/main/java/dev/lonami/talaria/ui/state/DialogUiState.kt index baeaa47..2191812 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/state/DialogUiState.kt @@ -1,4 +1,4 @@ -package dev.lonami.talaria.ui +package dev.lonami.talaria.ui.state import dev.lonami.talaria.models.Dialog diff --git a/app/src/main/java/dev/lonami/talaria/ui/DialogViewModel.kt b/app/src/main/java/dev/lonami/talaria/ui/state/DialogViewModel.kt similarity index 94% rename from app/src/main/java/dev/lonami/talaria/ui/DialogViewModel.kt rename to app/src/main/java/dev/lonami/talaria/ui/state/DialogViewModel.kt index 1f3dba8..db911c2 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/DialogViewModel.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/state/DialogViewModel.kt @@ -1,4 +1,4 @@ -package dev.lonami.talaria.ui +package dev.lonami.talaria.ui.state import androidx.lifecycle.ViewModel import dev.lonami.talaria.data.DialogSource