-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Clean up ABS responses * Book title could be nullable (!) * Remove Lucid Library * Remove room annotation processor * Change user Agent * Stable keys for Library Screen * Fix time extension locale * remove broken in-memory cache * update foreground
- Loading branch information
Showing
19 changed files
with
133 additions
and
133 deletions.
There are no files selected for viewing
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
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
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
3 changes: 2 additions & 1 deletion
3
app/src/main/java/org/grakovne/lissen/channel/common/UserAgent.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,5 +1,6 @@ | ||
package org.grakovne.lissen.channel.common | ||
|
||
import android.os.Build | ||
import org.grakovne.lissen.BuildConfig | ||
|
||
val USER_AGENT = "Lissen (Android ${Build.VERSION.RELEASE}; ${Build.MODEL}" | ||
val USER_AGENT = "Lissen/${BuildConfig.VERSION_NAME} (Linux; Android ${Build.VERSION.RELEASE}; ${Build.MODEL}) ExoPlayer/1.4.1" |
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
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
17 changes: 7 additions & 10 deletions
17
app/src/main/java/org/grakovne/lissen/ui/extensions/TimeExtensions.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,31 +1,28 @@ | ||
package org.grakovne.lissen.ui.extensions | ||
|
||
import android.annotation.SuppressLint | ||
import java.util.Locale | ||
|
||
@SuppressLint("DefaultLocale") | ||
fun Int.formatFully(): String { | ||
val hours = this / 3600 | ||
val minutes = (this % 3600) / 60 | ||
val remainingSeconds = this % 60 | ||
val seconds = this % 60 | ||
return if (hours > 0) { | ||
String.format("%02d:%02d:%02d", hours, minutes, remainingSeconds) | ||
String.format(Locale.getDefault(), "%02d:%02d:%02d", hours, minutes, seconds) | ||
} else { | ||
String.format("%02d:%02d", minutes, remainingSeconds) | ||
String.format(Locale.getDefault(), "%02d:%02d", minutes, seconds) | ||
} | ||
} | ||
|
||
@SuppressLint("DefaultLocale") | ||
fun Int.formatShortly(): String { | ||
val hours = this / 3600 | ||
val minutes = (this % 3600) / 60 | ||
|
||
return String.format("%02dh %02dm", hours, minutes) | ||
return String.format(Locale.getDefault(), "%02dh %02dm", hours, minutes) | ||
} | ||
|
||
@SuppressLint("DefaultLocale") | ||
fun Int.formatLeadingMinutes(): String { | ||
val minutes = this / 60 | ||
val remainingSeconds = this % 60 | ||
val seconds = this % 60 | ||
|
||
return String.format("%02d:%02d", minutes, remainingSeconds) | ||
return String.format(Locale.getDefault(), "%02d:%02d", minutes, seconds) | ||
} |
Oops, something went wrong.