moving page reducer to the compose-core module

This commit is contained in:
Adam Brown 2022-11-02 16:10:57 +00:00
parent ec56e74c98
commit 8a8aa375c0
5 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
package app.dapk.st.messenger.gallery package app.dapk.st.core.page
import app.dapk.st.design.components.SpiderPage import app.dapk.st.design.components.SpiderPage
import app.dapk.state.Action import app.dapk.state.Action

View File

@ -21,6 +21,7 @@ import androidx.compose.ui.unit.sp
import app.dapk.st.core.Lce import app.dapk.st.core.Lce
import app.dapk.st.core.LifecycleEffect import app.dapk.st.core.LifecycleEffect
import app.dapk.st.core.components.CenteredLoading import app.dapk.st.core.components.CenteredLoading
import app.dapk.st.core.page.PageAction
import app.dapk.st.design.components.GenericError import app.dapk.st.design.components.GenericError
import app.dapk.st.design.components.Spider import app.dapk.st.design.components.Spider
import app.dapk.st.design.components.SpiderPage import app.dapk.st.design.components.SpiderPage

View File

@ -2,6 +2,9 @@ package app.dapk.st.messenger.gallery.state
import app.dapk.st.core.JobBag import app.dapk.st.core.JobBag
import app.dapk.st.core.Lce import app.dapk.st.core.Lce
import app.dapk.st.core.page.PageAction
import app.dapk.st.core.page.PageContainer
import app.dapk.st.core.page.isDifferentPage
import app.dapk.st.design.components.SpiderPage import app.dapk.st.design.components.SpiderPage
import app.dapk.st.messenger.gallery.* import app.dapk.st.messenger.gallery.*
import app.dapk.state.* import app.dapk.state.*
@ -19,7 +22,7 @@ fun imageGalleryReducer(
) )
} }
private fun createPageReducer(roomName: String): ReducerFactory<PageContainer<ImageGalleryPage>> = createPageReducer( private fun createPageReducer(roomName: String): ReducerFactory<PageContainer<ImageGalleryPage>> = app.dapk.st.core.page.createPageReducer(
initialPage = SpiderPage( initialPage = SpiderPage(
route = ImageGalleryPage.Routes.folders, route = ImageGalleryPage.Routes.folders,
label = "Send to $roomName", label = "Send to $roomName",

View File

@ -5,7 +5,7 @@ import app.dapk.st.core.State
import app.dapk.st.design.components.Route import app.dapk.st.design.components.Route
import app.dapk.st.messenger.gallery.Folder import app.dapk.st.messenger.gallery.Folder
import app.dapk.st.messenger.gallery.Media import app.dapk.st.messenger.gallery.Media
import app.dapk.st.messenger.gallery.PageContainer import app.dapk.st.core.page.PageContainer
import app.dapk.state.Combined2 import app.dapk.state.Combined2
typealias ImageGalleryState = State<Combined2<PageContainer<ImageGalleryPage>, Unit>, Unit> typealias ImageGalleryState = State<Combined2<PageContainer<ImageGalleryPage>, Unit>, Unit>

View File

@ -4,7 +4,7 @@ import app.dapk.st.core.Lce
import app.dapk.st.design.components.SpiderPage import app.dapk.st.design.components.SpiderPage
import app.dapk.st.messenger.gallery.FetchMediaFoldersUseCase import app.dapk.st.messenger.gallery.FetchMediaFoldersUseCase
import app.dapk.st.messenger.gallery.FetchMediaUseCase import app.dapk.st.messenger.gallery.FetchMediaUseCase
import app.dapk.st.messenger.gallery.PageContainer import app.dapk.st.core.page.PageContainer
import app.dapk.state.Combined2 import app.dapk.state.Combined2
import fake.FakeJobBag import fake.FakeJobBag
import io.mockk.mockk import io.mockk.mockk