Better raid messaging, loader autochange to indeterminate, refs

This commit is contained in:
Kelvin 2025-07-04 17:27:35 +02:00
commit 00e28b9ce0
5 changed files with 20 additions and 7 deletions

View file

@ -64,6 +64,7 @@ class LiveChatOverlay : LinearLayout {
private val _overlayRaid: ConstraintLayout; private val _overlayRaid: ConstraintLayout;
private val _overlayRaid_Name: TextView; private val _overlayRaid_Name: TextView;
private val _overlayRaid_Message: TextView;
private val _overlayRaid_Thumbnail: ImageView; private val _overlayRaid_Thumbnail: ImageView;
private val _overlayRaid_ButtonGo: Button; private val _overlayRaid_ButtonGo: Button;
@ -146,6 +147,7 @@ class LiveChatOverlay : LinearLayout {
_overlayRaid = findViewById(R.id.overlay_raid); _overlayRaid = findViewById(R.id.overlay_raid);
_overlayRaid_Name = findViewById(R.id.raid_name); _overlayRaid_Name = findViewById(R.id.raid_name);
_overlayRaid_Message = findViewById(R.id.textRaidMessage);
_overlayRaid_Thumbnail = findViewById(R.id.raid_thumbnail); _overlayRaid_Thumbnail = findViewById(R.id.raid_thumbnail);
_overlayRaid_ButtonGo = findViewById(R.id.raid_button_go); _overlayRaid_ButtonGo = findViewById(R.id.raid_button_go);
_overlayRaid_ButtonDismiss = findViewById(R.id.raid_button_prevent); _overlayRaid_ButtonDismiss = findViewById(R.id.raid_button_prevent);
@ -371,7 +373,14 @@ class LiveChatOverlay : LinearLayout {
else else
_overlayRaid.visibility = View.GONE; _overlayRaid.visibility = View.GONE;
_overlayRaid_ButtonGo.visibility = if (raid?.isOutgoing == true) View.VISIBLE else View.GONE if(raid?.isOutgoing ?: false) {
_overlayRaid_ButtonGo.visibility = View.VISIBLE
_overlayRaid_Message.text = "Viewers are raiding";
}
else {
_overlayRaid_ButtonGo.visibility = View.GONE;
_overlayRaid_Message.text = "Raid incoming from";
}
} }
} }
fun setViewCount(viewCount: Int) { fun setViewCount(viewCount: Int) {

View file

@ -909,6 +909,10 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
duration = expectedDurationMs.toLong() duration = expectedDurationMs.toLong()
addUpdateListener { anim -> addUpdateListener { anim ->
loaderDeterminate.progress = anim.animatedValue as Int loaderDeterminate.progress = anim.animatedValue as Int
if(loaderDeterminate.progress > loaderDeterminate.max - 10) {
setLoading(true);
}
} }
start() start()
}; };

View file

@ -7,8 +7,8 @@
android:angle="270" android:angle="270"
android:centerColor="#ff5a5d5a" android:centerColor="#ff5a5d5a"
android:centerY="0.75" android:centerY="0.75"
android:endColor="#ff747674" android:endColor="#ff5a5d5a"
android:startColor="#ff9d9e9d" /> android:startColor="#ff5a5d5a" />
</shape> </shape>
</item> </item>
@ -20,7 +20,7 @@
android:angle="270" android:angle="270"
android:centerColor="#80ffb600" android:centerColor="#80ffb600"
android:centerY="0.75" android:centerY="0.75"
android:endColor="#a0ffcb00" android:endColor="#80ffd300"
android:startColor="#80ffd300" /> android:startColor="#80ffd300" />
</shape> </shape>
</clip> </clip>
@ -31,7 +31,7 @@
<corners android:radius="5dip" /> <corners android:radius="5dip" />
<gradient <gradient
android:angle="270" android:angle="270"
android:endColor="#000080" android:endColor="#3333FF"
android:startColor="#3333FF" /> android:startColor="#3333FF" />
</shape> </shape>
</clip> </clip>

@ -1 +1 @@
Subproject commit 2036f9b68255d2f9ef4e1232b4ad556e11cafb9a Subproject commit f793e625641195f5fe60d94a829e7f44a93325a6

@ -1 +1 @@
Subproject commit 2036f9b68255d2f9ef4e1232b4ad556e11cafb9a Subproject commit f793e625641195f5fe60d94a829e7f44a93325a6