moving page reducer to the compose-core module
This commit is contained in:
parent
ec56e74c98
commit
8a8aa375c0
|
@ -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
|
|
@ -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
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue