Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div align="center">
<div align="center">
<img width="200" height="200" style="display: block; border: 1px solid #f5f5f5; border-radius: 9999px;" src="https://raw.githubusercontent.com/ReadYouApp/ReadYou/main/fastlane/metadata/android/en-US/images/icon.png">
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ sealed class SyncIntervalPreference(
object Every6Hours : SyncIntervalPreference(360L)
object Every12Hours : SyncIntervalPreference(720L)
object Every1Day : SyncIntervalPreference(1440L)
object Every3Days : SyncIntervalPreference(4320L)
object Every1Week : SyncIntervalPreference(10080L)

fun put(accountId: Int, viewModel: AccountViewModel) {
viewModel.update(accountId) { copy(syncInterval = this@SyncIntervalPreference) }
Expand All @@ -37,6 +39,8 @@ sealed class SyncIntervalPreference(
Every6Hours -> context.getString(R.string.every_6_hours)
Every12Hours -> context.getString(R.string.every_12_hours)
Every1Day -> context.getString(R.string.every_1_day)
Every3Days -> context.getString(R.string.every_3_days)
Every1Week -> context.getString(R.string.every_1_week)
}

fun toPeriodicWorkRequestBuilder(): PeriodicWorkRequest.Builder =
Expand All @@ -55,6 +59,8 @@ sealed class SyncIntervalPreference(
Every6Hours,
Every12Hours,
Every1Day,
Every3Days,
Every1Week,
)
}
}
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@
<string name="every_6_hours">Every 6 hours</string>
<string name="every_12_hours">Every 12 hours</string>
<string name="every_1_day">Every day</string>
<string name="every_3_days">Every 3 days</string>
<string name="every_1_week">Every week</string>
<string name="manually">Manually</string>
<string name="always">Always</string>
<string name="for_1_day">1 day</string>
Expand Down
Loading