Skip to content

Commit

Permalink
Merge pull request #894 from woxtu/throws
Browse files Browse the repository at this point in the history
[iOS] Fix app crash when network issues occur
  • Loading branch information
ry-itto authored Oct 12, 2022
2 parents 730548f + 6b395e4 commit 9794742
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package io.github.droidkaigi.confsched2022.model

import kotlinx.collections.immutable.PersistentList
import kotlinx.coroutines.flow.Flow
import kotlin.coroutines.cancellation.CancellationException

public interface AnnouncementsRepository {
public fun announcements(): Flow<PersistentList<AnnouncementsByDate>>
@Throws(AppError::class, CancellationException::class)
public suspend fun refresh()
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package io.github.droidkaigi.confsched2022.model

import kotlinx.collections.immutable.PersistentList
import kotlinx.coroutines.flow.Flow
import kotlin.coroutines.cancellation.CancellationException

public interface ContributorsRepository {
public fun contributors(): Flow<PersistentList<Contributor>>
@Throws(AppError::class, CancellationException::class)
public suspend fun refresh()
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package io.github.droidkaigi.confsched2022.model

import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
import kotlin.coroutines.cancellation.CancellationException

public interface SessionsRepository {
public fun droidKaigiScheduleFlow(): Flow<DroidKaigiSchedule>
Expand All @@ -15,6 +16,7 @@ public interface SessionsRepository {

public suspend fun getCategories(): List<TimetableCategory>

@Throws(AppError::class, CancellationException::class)
public suspend fun refresh()
public suspend fun setFavorite(sessionId: TimetableItemId, favorite: Boolean)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package io.github.droidkaigi.confsched2022.model

import kotlinx.collections.immutable.PersistentList
import kotlinx.coroutines.flow.Flow
import kotlin.coroutines.cancellation.CancellationException

public interface SponsorsRepository {
public fun sponsors(): Flow<PersistentList<Sponsor>>

@Throws(AppError::class, CancellationException::class)
public suspend fun refresh()
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package io.github.droidkaigi.confsched2022.model

import kotlinx.collections.immutable.PersistentList
import kotlinx.coroutines.flow.Flow
import kotlin.coroutines.cancellation.CancellationException

public interface StaffRepository {
public fun staff(): Flow<PersistentList<Staff>>

@Throws(AppError::class, CancellationException::class)
public suspend fun refresh()
}

0 comments on commit 9794742

Please sign in to comment.