1.2.4稳定版 #3

Merged
yovinchen merged 40 commits from develop into master 2024-12-05 16:52:26 +08:00
2 changed files with 12 additions and 7 deletions
Showing only changes of commit c7603c0f69 - Show all commits

View File

@ -26,7 +26,6 @@ import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext

View File

@ -1,21 +1,27 @@
package com.yovinchen.bookkeeping.viewmodel package com.yovinchen.bookkeeping.viewmodel
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.yovinchen.bookkeeping.data.BookkeepingDatabase import com.yovinchen.bookkeeping.data.BookkeepingDatabase
import com.yovinchen.bookkeeping.model.BookkeepingRecord import com.yovinchen.bookkeeping.model.BookkeepingRecord
import com.yovinchen.bookkeeping.model.MemberStat import com.yovinchen.bookkeeping.model.MemberStat
import kotlinx.coroutines.flow.* import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.stateIn
import java.time.YearMonth import java.time.YearMonth
import java.time.ZoneId import java.time.ZoneId
import java.util.Date import java.util.Date
class CategoryDetailViewModel( class CategoryDetailViewModel(
private val database: BookkeepingDatabase, database: BookkeepingDatabase,
private val category: String, category: String,
private val startMonth: YearMonth, startMonth: YearMonth,
private val endMonth: YearMonth endMonth: YearMonth
) : ViewModel() { ) : ViewModel() {
private val recordDao = database.bookkeepingDao() private val recordDao = database.bookkeepingDao()