forked from Lonami/Talaria
Rename model package to models for consistency
This commit is contained in:
parent
fc7dc68b62
commit
c627db973c
|
@ -1,7 +1,7 @@
|
||||||
package dev.lonami.talaria.data
|
package dev.lonami.talaria.data
|
||||||
|
|
||||||
import dev.lonami.talaria.bindings.Native
|
import dev.lonami.talaria.bindings.Native
|
||||||
import dev.lonami.talaria.model.Dialog
|
import dev.lonami.talaria.models.Dialog
|
||||||
|
|
||||||
interface DialogRepository {
|
interface DialogRepository {
|
||||||
fun loadDialogs(): List<Dialog>;
|
fun loadDialogs(): List<Dialog>;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.lonami.talaria.data
|
package dev.lonami.talaria.data
|
||||||
|
|
||||||
import dev.lonami.talaria.model.Message
|
import dev.lonami.talaria.models.Message
|
||||||
|
|
||||||
object MessageRepository {
|
object MessageRepository {
|
||||||
fun loadMessages(): List<Message> {
|
fun loadMessages(): List<Message> {
|
||||||
|
|
|
@ -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)
|
data class Dialog(val title: String, val lastMessage: String, val pinned: Boolean)
|
|
@ -1,3 +1,3 @@
|
||||||
package dev.lonami.talaria.model
|
package dev.lonami.talaria.models
|
||||||
|
|
||||||
data class Message(val sender: String, val text: String)
|
data class Message(val sender: String, val text: String)
|
|
@ -19,7 +19,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import dev.lonami.talaria.R
|
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 dev.lonami.talaria.ui.theme.TalariaTheme
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package dev.lonami.talaria.ui
|
package dev.lonami.talaria.ui
|
||||||
|
|
||||||
import dev.lonami.talaria.model.Message
|
import dev.lonami.talaria.models.Message
|
||||||
|
|
||||||
data class ChatUiState(val messages: MutableList<Message> = mutableListOf())
|
data class ChatUiState(val messages: MutableList<Message> = mutableListOf())
|
||||||
|
|
|
@ -3,7 +3,7 @@ package dev.lonami.talaria.ui
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import dev.lonami.talaria.bindings.Native
|
import dev.lonami.talaria.bindings.Native
|
||||||
import dev.lonami.talaria.data.MessageRepository
|
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.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.flow.asStateFlow
|
import kotlinx.coroutines.flow.asStateFlow
|
||||||
|
|
|
@ -22,7 +22,7 @@ import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import dev.lonami.talaria.R
|
import dev.lonami.talaria.R
|
||||||
import dev.lonami.talaria.data.MockDialogRepository
|
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
|
import dev.lonami.talaria.ui.theme.TalariaTheme
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package dev.lonami.talaria.ui
|
package dev.lonami.talaria.ui
|
||||||
|
|
||||||
import dev.lonami.talaria.model.Dialog
|
import dev.lonami.talaria.models.Dialog
|
||||||
|
|
||||||
data class DialogUiState(val dialogs: List<Dialog> = listOf())
|
data class DialogUiState(val dialogs: List<Dialog> = listOf())
|
||||||
|
|
Loading…
Reference in New Issue