Skip to content

Commit

Permalink
intercept even more login requests
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed May 12, 2024
1 parent f51b5ea commit bb5f7ab
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 10 deletions.
85 changes: 85 additions & 0 deletions composeApp/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,91 @@
<data android:scheme="app" />
<data android:host="animite" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="intent" />
<data android:host="com.mxt.anitrend" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="alchan" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="com.revolgenx.anilib" />
<data android:host="anilist.co" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="anitrack" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="com.ikn.oujo" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="com.torakkaapp.torakka"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>

<data android:scheme="aluminium" />
<data android:host="login" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="app" />
<data android:host="otraku" />
<data android:pathPrefix="/auth" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="kurumi"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="myanitrack" />
</intent-filter>
</activity>

<!-- Trigger Google Play services to install the backported photo picker module. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ import dev.datlag.aniflow.settings.model.TitleLanguage
import dev.datlag.aniflow.trace.TraceRepository
import dev.datlag.aniflow.ui.navigation.DialogComponent
import dev.datlag.aniflow.ui.navigation.screen.home.dialog.settings.SettingsDialogComponent
import dev.datlag.tooling.compose.ioDispatcher
import dev.datlag.tooling.decompose.ioScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.*
import org.kodein.di.DI
import org.kodein.di.instance

Expand Down Expand Up @@ -61,7 +59,9 @@ class HomeScreenComponent(
private val airingTodayRepository by instance<AiringTodayRepository>()
override val airing: Flow<AiringTodayRepository.State> = airingTodayRepository.airing.map {
StateSaver.Home.updateAiring(it)
}.stateIn(
}.flowOn(
context = ioDispatcher()
).stateIn(
scope = stateScope,
started = SharingStarted.WhileSubscribed(),
initialValue = AiringTodayRepository.State.None
Expand All @@ -70,7 +70,9 @@ class HomeScreenComponent(
private val trendingRepository by instance<TrendingRepository>()
override val trending: Flow<CollectionState> = trendingRepository.trending.map {
StateSaver.Home.updateTrending(it)
}.stateIn(
}.flowOn(
context = ioDispatcher()
).stateIn(
scope = stateScope,
started = SharingStarted.WhileSubscribed(),
initialValue = CollectionState.None
Expand All @@ -79,7 +81,9 @@ class HomeScreenComponent(
private val popularSeasonRepository by instance<PopularSeasonRepository>()
override val popularNow: Flow<CollectionState> = popularSeasonRepository.popularThisSeason.map {
StateSaver.Home.updatePopularCurrent(it)
}.stateIn(
}.flowOn(
context = ioDispatcher()
).stateIn(
scope = stateScope,
started = SharingStarted.WhileSubscribed(),
initialValue = CollectionState.None
Expand All @@ -88,14 +92,16 @@ class HomeScreenComponent(
private val popularNextSeasonRepository by instance<PopularNextSeasonRepository>()
override val popularNext: Flow<CollectionState> = popularNextSeasonRepository.popularNextSeason.map {
StateSaver.Home.updatePopularNext(it)
}.stateIn(
}.flowOn(
context = ioDispatcher()
).stateIn(
scope = stateScope,
started = SharingStarted.WhileSubscribed(),
initialValue = CollectionState.None
)

private val traceRepository by instance<TraceRepository>()
override val traceState: Flow<TraceRepository.State> = traceRepository.response
override val traceState: Flow<TraceRepository.State> = traceRepository.response.flowOn(context = ioDispatcher())

private val dialogNavigation = SlotNavigation<DialogConfig>()
override val dialog: Value<ChildSlot<DialogConfig, DialogComponent>> = childSlot(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ class MediumScreenComponent(
override val charLanguage: Flow<CharLanguage?> = appSettings.charLanguage.flowOn(ioDispatcher())

private val mediumRepository by di.instance<MediumRepository>()
override val mediumState = mediumRepository.medium.stateIn(
override val mediumState = mediumRepository.medium.flowOn(
context = ioDispatcher()
).stateIn(
scope = ioScope(),
started = SharingStarted.WhileSubscribed(),
initialValue = MediumRepository.State.None
Expand Down

0 comments on commit bb5f7ab

Please sign in to comment.