Skip to content

Commit

Permalink
[1.86.*] Pre-release merge (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
tramline-github[bot] authored Mar 1, 2024
2 parents a5dba18 + f10528d commit d7d071d
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import com.arkivanov.decompose.ComponentContext
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject

internal typealias AboutPresenterFactory =
(
ComponentContext,
goBack: () -> Unit,
) -> AboutPresenter

@Inject
class AboutPresenter(
@Assisted componentContext: ComponentContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ import com.arkivanov.essenty.instancekeeper.InstanceKeeper
import com.arkivanov.essenty.instancekeeper.getOrCreate
import com.arkivanov.essenty.lifecycle.coroutines.coroutineScope
import com.arkivanov.essenty.lifecycle.doOnStart
import dev.sasikanth.rss.reader.about.AboutPresenter
import dev.sasikanth.rss.reader.bookmarks.BookmarksPresenter
import dev.sasikanth.rss.reader.about.AboutPresenterFactory
import dev.sasikanth.rss.reader.bookmarks.BookmarksPresenterFactory
import dev.sasikanth.rss.reader.di.scopes.ActivityScope
import dev.sasikanth.rss.reader.feed.FeedPresenter
import dev.sasikanth.rss.reader.home.HomePresenter
import dev.sasikanth.rss.reader.feed.FeedPresenterFactory
import dev.sasikanth.rss.reader.home.HomePresenterFactory
import dev.sasikanth.rss.reader.platform.LinkHandler
import dev.sasikanth.rss.reader.reader.ReaderPresenter
import dev.sasikanth.rss.reader.reader.ReaderPresenterFactory
import dev.sasikanth.rss.reader.refresh.LastUpdatedAt
import dev.sasikanth.rss.reader.repository.RssRepository
import dev.sasikanth.rss.reader.repository.SettingsRepository
import dev.sasikanth.rss.reader.search.SearchPresenter
import dev.sasikanth.rss.reader.settings.SettingsPresenter
import dev.sasikanth.rss.reader.search.SearchPresentFactory
import dev.sasikanth.rss.reader.settings.SettingsPresenterFactory
import dev.sasikanth.rss.reader.util.DispatchersProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
Expand All @@ -53,65 +53,14 @@ import kotlinx.coroutines.withContext
import kotlinx.serialization.Serializable
import me.tatarka.inject.annotations.Inject

private typealias HomePresenterFactory =
(
ComponentContext,
openSearch: () -> Unit,
openBookmarks: () -> Unit,
openSettings: () -> Unit,
openPost: (String) -> Unit,
openFeedInfo: (String) -> Unit,
) -> HomePresenter

private typealias SearchPresentFactory =
(
ComponentContext,
goBack: () -> Unit,
openPost: (String) -> Unit,
) -> SearchPresenter

private typealias BookmarkPresenterFactory =
(
ComponentContext,
goBack: () -> Unit,
openReaderView: (String) -> Unit,
) -> BookmarksPresenter

private typealias SettingsPresenterFactory =
(
ComponentContext,
goBack: () -> Unit,
openAbout: () -> Unit,
) -> SettingsPresenter

private typealias AboutPresenterFactory =
(
ComponentContext,
goBack: () -> Unit,
) -> AboutPresenter

private typealias ReaderPresenterFactory =
(
postLink: String,
ComponentContext,
goBack: () -> Unit,
) -> ReaderPresenter

private typealias FeedPresenterFactory =
(
feedLink: String,
ComponentContext,
dismiss: () -> Unit,
) -> FeedPresenter

@Inject
@ActivityScope
class AppPresenter(
componentContext: ComponentContext,
private val dispatchersProvider: DispatchersProvider,
private val homePresenter: HomePresenterFactory,
private val searchPresenter: SearchPresentFactory,
private val bookmarksPresenter: BookmarkPresenterFactory,
private val bookmarksPresenter: BookmarksPresenterFactory,
private val settingsPresenter: SettingsPresenterFactory,
private val aboutPresenter: AboutPresenterFactory,
private val readerPresenter: ReaderPresenterFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject

internal typealias BookmarksPresenterFactory =
(
ComponentContext,
goBack: () -> Unit,
openReaderView: (String) -> Unit,
) -> BookmarksPresenter

@Inject
class BookmarksPresenter(
dispatchersProvider: DispatchersProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject

internal typealias FeedPresenterFactory =
(
feedLink: String,
ComponentContext,
dismiss: () -> Unit,
) -> FeedPresenter

@Inject
class FeedPresenter(
dispatchersProvider: DispatchersProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ import kotlinx.datetime.Instant
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject

internal typealias HomePresenterFactory =
(
ComponentContext,
openSearch: () -> Unit,
openBookmarks: () -> Unit,
openSettings: () -> Unit,
openPost: (String) -> Unit,
openFeedInfo: (String) -> Unit,
) -> HomePresenter

@Inject
@OptIn(ExperimentalCoroutinesApi::class)
class HomePresenter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ import kotlinx.coroutines.withContext
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject

internal typealias ReaderPresenterFactory =
(
postLink: String,
ComponentContext,
goBack: () -> Unit,
) -> ReaderPresenter

@Inject
class ReaderPresenter(
dispatchersProvider: DispatchersProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject

internal typealias SearchPresentFactory =
(
ComponentContext,
goBack: () -> Unit,
openPost: (String) -> Unit,
) -> SearchPresenter

@Inject
class SearchPresenter(
rssRepository: RssRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject

internal typealias SettingsPresenterFactory =
(
ComponentContext,
goBack: () -> Unit,
openAbout: () -> Unit,
) -> SettingsPresenter

@Inject
class SettingsPresenter(
dispatchersProvider: DispatchersProvider,
Expand Down

0 comments on commit d7d071d

Please sign in to comment.