-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
adab561
commit 4371388
Showing
8 changed files
with
47 additions
and
34 deletions.
There are no files selected for viewing
11 changes: 7 additions & 4 deletions
11
...commonMain/kotlin/org/hyperskill/app/share_streak/cache/ShareStreakCacheDataSourceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
...nMain/kotlin/org/hyperskill/app/share_streak/data/repository/ShareStreakRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...mmonMain/kotlin/org/hyperskill/app/share_streak/data/source/ShareStreakCacheDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package org.hyperskill.app.share_streak.data.source | ||
|
||
import kotlinx.datetime.Instant | ||
|
||
internal interface ShareStreakCacheDataSource { | ||
fun getLastTimeShareStreakShownEpochMilliseconds(): Long? | ||
fun setLastTimeShareStreakShown(epochMilliseconds: Long) | ||
fun getLastTimeShareStreakShown(): Instant? | ||
fun setLastTimeShareStreakShown(instant: Instant) | ||
fun clearCache() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...monMain/kotlin/org/hyperskill/app/share_streak/domain/repository/ShareStreakRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
package org.hyperskill.app.share_streak.domain.repository | ||
|
||
import kotlinx.datetime.Clock | ||
import kotlinx.datetime.Instant | ||
|
||
interface ShareStreakRepository { | ||
fun getLastTimeShareStreakShownEpochMilliseconds(): Long? | ||
fun setLastTimeShareStreakShown(epochMilliseconds: Long) | ||
fun getLastTimeShareStreakShown(): Instant? | ||
fun setLastTimeShareStreakShown(instant: Instant = Clock.System.now()) | ||
fun clearCache() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters