From c627db973c20d986f135cc5afe430462fce3b8db Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Fri, 21 Oct 2022 20:27:19 +0200 Subject: [PATCH] Rename model package to models for consistency --- app/src/main/java/dev/lonami/talaria/data/DialogRepository.kt | 2 +- app/src/main/java/dev/lonami/talaria/data/MessageRepository.kt | 2 +- .../main/java/dev/lonami/talaria/{model => models}/Dialog.kt | 2 +- .../main/java/dev/lonami/talaria/{model => models}/Message.kt | 2 +- app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt | 2 +- app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt | 2 +- app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt | 2 +- app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt | 2 +- app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename app/src/main/java/dev/lonami/talaria/{model => models}/Dialog.kt (71%) rename app/src/main/java/dev/lonami/talaria/{model => models}/Message.kt (63%) diff --git a/app/src/main/java/dev/lonami/talaria/data/DialogRepository.kt b/app/src/main/java/dev/lonami/talaria/data/DialogRepository.kt index 3b8e15e..89e3ef7 100644 --- a/app/src/main/java/dev/lonami/talaria/data/DialogRepository.kt +++ b/app/src/main/java/dev/lonami/talaria/data/DialogRepository.kt @@ -1,7 +1,7 @@ package dev.lonami.talaria.data import dev.lonami.talaria.bindings.Native -import dev.lonami.talaria.model.Dialog +import dev.lonami.talaria.models.Dialog interface DialogRepository { fun loadDialogs(): List; diff --git a/app/src/main/java/dev/lonami/talaria/data/MessageRepository.kt b/app/src/main/java/dev/lonami/talaria/data/MessageRepository.kt index 0bd81bb..3e97ddd 100644 --- a/app/src/main/java/dev/lonami/talaria/data/MessageRepository.kt +++ b/app/src/main/java/dev/lonami/talaria/data/MessageRepository.kt @@ -1,6 +1,6 @@ package dev.lonami.talaria.data -import dev.lonami.talaria.model.Message +import dev.lonami.talaria.models.Message object MessageRepository { fun loadMessages(): List { diff --git a/app/src/main/java/dev/lonami/talaria/model/Dialog.kt b/app/src/main/java/dev/lonami/talaria/models/Dialog.kt similarity index 71% rename from app/src/main/java/dev/lonami/talaria/model/Dialog.kt rename to app/src/main/java/dev/lonami/talaria/models/Dialog.kt index f121cc0..a75b67c 100644 --- a/app/src/main/java/dev/lonami/talaria/model/Dialog.kt +++ b/app/src/main/java/dev/lonami/talaria/models/Dialog.kt @@ -1,3 +1,3 @@ -package dev.lonami.talaria.model +package dev.lonami.talaria.models data class Dialog(val title: String, val lastMessage: String, val pinned: Boolean) diff --git a/app/src/main/java/dev/lonami/talaria/model/Message.kt b/app/src/main/java/dev/lonami/talaria/models/Message.kt similarity index 63% rename from app/src/main/java/dev/lonami/talaria/model/Message.kt rename to app/src/main/java/dev/lonami/talaria/models/Message.kt index 7f09bcb..2192574 100644 --- a/app/src/main/java/dev/lonami/talaria/model/Message.kt +++ b/app/src/main/java/dev/lonami/talaria/models/Message.kt @@ -1,3 +1,3 @@ -package dev.lonami.talaria.model +package dev.lonami.talaria.models data class Message(val sender: String, val text: String) diff --git a/app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt b/app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt index 7fbbe26..dd9cbb2 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/ChatScreen.kt @@ -19,7 +19,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import dev.lonami.talaria.R -import dev.lonami.talaria.model.Message +import dev.lonami.talaria.models.Message import dev.lonami.talaria.ui.theme.TalariaTheme import kotlinx.coroutines.launch diff --git a/app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt b/app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt index 9f63a18..683851f 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/ChatUiState.kt @@ -1,5 +1,5 @@ package dev.lonami.talaria.ui -import dev.lonami.talaria.model.Message +import dev.lonami.talaria.models.Message data class ChatUiState(val messages: MutableList = mutableListOf()) diff --git a/app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt b/app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt index e420e12..c27c008 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/ChatViewModel.kt @@ -3,7 +3,7 @@ package dev.lonami.talaria.ui import androidx.lifecycle.ViewModel import dev.lonami.talaria.bindings.Native import dev.lonami.talaria.data.MessageRepository -import dev.lonami.talaria.model.Message +import dev.lonami.talaria.models.Message import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow diff --git a/app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt b/app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt index ee8dbb3..31d03bb 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/DialogScreen.kt @@ -22,7 +22,7 @@ import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import dev.lonami.talaria.R import dev.lonami.talaria.data.MockDialogRepository -import dev.lonami.talaria.model.Dialog +import dev.lonami.talaria.models.Dialog import dev.lonami.talaria.ui.theme.TalariaTheme @Composable diff --git a/app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt b/app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt index 7c3dcb6..baeaa47 100644 --- a/app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt +++ b/app/src/main/java/dev/lonami/talaria/ui/DialogUiState.kt @@ -1,5 +1,5 @@ package dev.lonami.talaria.ui -import dev.lonami.talaria.model.Dialog +import dev.lonami.talaria.models.Dialog data class DialogUiState(val dialogs: List = listOf())