mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 19:17:21 +00:00
Added ability to get the number of entries and radios
This commit is contained in:
1 parent
afe9f77869
commit
0404f7be90
6 files changed
+26
No files matched your search
@@ -45,6 +45,10 @@ class DataRepository(
|
||||
_updateState.value = DataState.Handled
|
||||
}
|
||||
|
||||
override fun getEntriesNumber() = localSource.getEntriesNumber()
|
||||
|
||||
override fun getRadiosNumber() = localSource.getRadiosNumber()
|
||||
|
||||
override suspend fun getEntriesWithModes() = localSource.getEntriesWithModes()
|
||||
|
||||
override suspend fun getSelectedEntries() = localSource.getSelectedEntries()
|
||||
|
||||
@@ -21,10 +21,15 @@ import com.rtbishop.look4sat.domain.model.SatEntry
|
||||
import com.rtbishop.look4sat.domain.model.SatItem
|
||||
import com.rtbishop.look4sat.domain.model.SatRadio
|
||||
import com.rtbishop.look4sat.domain.predict.Satellite
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import java.io.InputStream
|
||||
|
||||
interface ILocalSource {
|
||||
|
||||
fun getEntriesNumber(): Flow<Int>
|
||||
|
||||
fun getRadiosNumber(): Flow<Int>
|
||||
|
||||
suspend fun getEntriesWithModes(): List<SatItem>
|
||||
|
||||
suspend fun getSelectedEntries(): List<Satellite>
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.rtbishop.look4sat.domain.model.DataState
|
||||
import com.rtbishop.look4sat.domain.model.SatItem
|
||||
import com.rtbishop.look4sat.domain.model.SatRadio
|
||||
import com.rtbishop.look4sat.domain.predict.Satellite
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
||||
interface IDataRepository {
|
||||
@@ -29,6 +30,10 @@ interface IDataRepository {
|
||||
|
||||
fun setUpdateStateHandled()
|
||||
|
||||
fun getEntriesNumber(): Flow<Int>
|
||||
|
||||
fun getRadiosNumber(): Flow<Int>
|
||||
|
||||
suspend fun getEntriesWithModes(): List<SatItem>
|
||||
|
||||
suspend fun getSelectedEntries(): List<Satellite>
|
||||
|
||||
Reference in new issue
Block a user