Skip to content

Commit

Permalink
fix uptime after raid
Browse files Browse the repository at this point in the history
(cherry picked from commit d9868a2)
  • Loading branch information
crackededed committed Aug 3, 2023
1 parent 274bbbe commit 1548ab9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
13 changes: 5 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ plugins {
alias(libs.plugins.navigation.safeargs)
}

kotlin {
jvmToolchain(17)
}

android {
signingConfigs {
getByName("debug") {
Expand All @@ -24,7 +28,7 @@ android {
minSdk = 16
targetSdk = 33
versionCode = 121
versionName = "2.24.0"
versionName = "2.24.1"
resourceConfigurations += listOf("ar", "de", "en", "es", "fr", "in", "ja", "pt-rBR", "ru", "tr")
}

Expand All @@ -42,13 +46,6 @@ android {
signingConfig = signingConfigs.getByName("debug")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
buildConfig = true
viewBinding = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data class Stream(
val type: String? = null,
var title: String? = null,
var viewerCount: Int? = null,
val startedAt: String? = null,
var startedAt: String? = null,
val thumbnailUrl: String? = null,

var profileImageUrl: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.core.content.ContextCompat
import androidx.core.os.bundleOf
import androidx.core.view.isVisible
import androidx.core.widget.NestedScrollView
import androidx.fragment.app.viewModels
import androidx.lifecycle.lifecycleScope
Expand Down Expand Up @@ -101,6 +102,13 @@ class StreamPlayerFragment : BasePlayerFragment() {
requireView().findViewById<TextView>(R.id.playerCategory)?.text.isNullOrBlank()) {
updateTitle(BroadcastSettings(it?.title, it?.gameId, it?.gameName))
}
if (prefs.getBoolean(C.PLAYER_SHOW_UPTIME, true) && requireView().findViewById<LinearLayout>(R.id.playerUptime)?.isVisible == false) {
it?.startedAt?.let { date ->
TwitchApiHelper.parseIso8601Date(date)?.let { startedAtMs ->
updateUptime(TimeZone.getDefault().getOffset(System.currentTimeMillis()) + startedAtMs)
}
}
}
}
if (prefs.getBoolean(C.PLAYER_MENU, true)) {
requireView().findViewById<ImageButton>(R.id.playerMenu)?.apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class StreamPlayerViewModel @Inject constructor(
gameName = it?.gameName
title = it?.title
viewerCount = it?.viewerCount
startedAt = it?.startedAt
}
}
_stream.postValue(s)
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[versions]
android-gradle-plugin = "8.0.2"
android-gradle-plugin = "8.1.0"
apollo = "3.8.2"
appcompat = "1.7.0-alpha02"
checker-qual = "3.36.0"
coil = "2.4.0"
constraintlayout = "2.1.4"
core = "1.10.1"
coroutines = "1.7.2"
coroutines = "1.7.3"
draglistview = "1.7.3"
fetch = "3.1.6"
flexbox = "3.0.0"
fragment = "1.6.0"
fragment = "1.6.1"
glide = "4.15.1"
glide-webpdecoder = "2.3.4.15.1"
hilt = "2.47"
Expand All @@ -23,7 +23,7 @@ media3 = "1.1.0"
navigation = "2.6.0"
okhttp = "5.0.0-alpha.11"
open-m3u8 = "0.2.6"
paging = "3.1.1"
paging = "3.2.0"
preference = "1.2.0"
request-inspector-webview = "1.0.3"
retrofit = "2.9.0"
Expand Down

0 comments on commit 1548ab9

Please sign in to comment.