mirror of https://github.com/readrops/Readrops.git
Update Voyager
This commit is contained in:
parent
2ee2144fd3
commit
97dc2446ce
|
@ -78,11 +78,9 @@ dependencies {
|
||||||
|
|
||||||
implementation "com.google.accompanist:accompanist-swiperefresh:0.30.1"
|
implementation "com.google.accompanist:accompanist-swiperefresh:0.30.1"
|
||||||
|
|
||||||
def voyager = "1.0.0-rc03"
|
def voyager = "1.0.0"
|
||||||
implementation "cafe.adriel.voyager:voyager-navigator:$voyager"
|
implementation "cafe.adriel.voyager:voyager-navigator:$voyager"
|
||||||
implementation "cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyager"
|
|
||||||
implementation "cafe.adriel.voyager:voyager-tab-navigator:$voyager"
|
implementation "cafe.adriel.voyager:voyager-tab-navigator:$voyager"
|
||||||
implementation "cafe.adriel.voyager:voyager-androidx:$voyager"
|
|
||||||
implementation "cafe.adriel.voyager:voyager-koin:$voyager"
|
implementation "cafe.adriel.voyager:voyager-koin:$voyager"
|
||||||
implementation "cafe.adriel.voyager:voyager-transitions:$voyager"
|
implementation "cafe.adriel.voyager:voyager-transitions:$voyager"
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@ import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import cafe.adriel.voyager.androidx.AndroidScreen
|
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
import com.readrops.app.compose.home.HomeScreen
|
import com.readrops.app.compose.home.HomeScreen
|
||||||
|
import com.readrops.app.compose.util.components.AndroidScreen
|
||||||
import com.readrops.db.entities.account.Account
|
import com.readrops.db.entities.account.Account
|
||||||
import com.readrops.db.entities.account.AccountType
|
import com.readrops.db.entities.account.AccountType
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,12 @@ import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
import cafe.adriel.voyager.androidx.AndroidScreen
|
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
import com.readrops.app.compose.R
|
import com.readrops.app.compose.R
|
||||||
import com.readrops.app.compose.account.credentials.AccountCredentialsScreen
|
import com.readrops.app.compose.account.credentials.AccountCredentialsScreen
|
||||||
import com.readrops.app.compose.home.HomeScreen
|
import com.readrops.app.compose.home.HomeScreen
|
||||||
|
import com.readrops.app.compose.util.components.AndroidScreen
|
||||||
import com.readrops.db.entities.account.AccountType
|
import com.readrops.db.entities.account.AccountType
|
||||||
import org.koin.androidx.compose.getViewModel
|
import org.koin.androidx.compose.getViewModel
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import cafe.adriel.voyager.androidx.AndroidScreen
|
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
import cafe.adriel.voyager.navigator.tab.CurrentTab
|
import cafe.adriel.voyager.navigator.tab.CurrentTab
|
||||||
|
@ -26,6 +25,7 @@ import com.readrops.app.compose.account.AccountTab
|
||||||
import com.readrops.app.compose.feeds.FeedTab
|
import com.readrops.app.compose.feeds.FeedTab
|
||||||
import com.readrops.app.compose.more.MoreTab
|
import com.readrops.app.compose.more.MoreTab
|
||||||
import com.readrops.app.compose.timelime.TimelineTab
|
import com.readrops.app.compose.timelime.TimelineTab
|
||||||
|
import com.readrops.app.compose.util.components.AndroidScreen
|
||||||
|
|
||||||
class HomeScreen : AndroidScreen() {
|
class HomeScreen : AndroidScreen() {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.readrops.app.compose.item
|
||||||
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import cafe.adriel.voyager.androidx.AndroidScreen
|
import com.readrops.app.compose.util.components.AndroidScreen
|
||||||
|
|
||||||
class ItemScreen : AndroidScreen() {
|
class ItemScreen : AndroidScreen() {
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.readrops.app.compose.util.components
|
||||||
|
|
||||||
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
|
import cafe.adriel.voyager.core.screen.ScreenKey
|
||||||
|
import cafe.adriel.voyager.core.screen.uniqueScreenKey
|
||||||
|
|
||||||
|
abstract class AndroidScreen : Screen {
|
||||||
|
|
||||||
|
override val key: ScreenKey = uniqueScreenKey
|
||||||
|
}
|
Loading…
Reference in New Issue