Better raid messaging, loader autochange to indeterminate, refs

This commit is contained in:
Kelvin
2025-07-04 17:27:35 +02:00
parent 334f58979a
commit 00e28b9ce0
5 changed files with 20 additions and 7 deletions
@@ -64,6 +64,7 @@ class LiveChatOverlay : LinearLayout {
private val _overlayRaid: ConstraintLayout;
private val _overlayRaid_Name: TextView;
private val _overlayRaid_Message: TextView;
private val _overlayRaid_Thumbnail: ImageView;
private val _overlayRaid_ButtonGo: Button;
@@ -146,6 +147,7 @@ class LiveChatOverlay : LinearLayout {
_overlayRaid = findViewById(R.id.overlay_raid);
_overlayRaid_Name = findViewById(R.id.raid_name);
_overlayRaid_Message = findViewById(R.id.textRaidMessage);
_overlayRaid_Thumbnail = findViewById(R.id.raid_thumbnail);
_overlayRaid_ButtonGo = findViewById(R.id.raid_button_go);
_overlayRaid_ButtonDismiss = findViewById(R.id.raid_button_prevent);
@@ -371,7 +373,14 @@ class LiveChatOverlay : LinearLayout {
else
_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) {
@@ -909,6 +909,10 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
duration = expectedDurationMs.toLong()
addUpdateListener { anim ->
loaderDeterminate.progress = anim.animatedValue as Int
if(loaderDeterminate.progress > loaderDeterminate.max - 10) {
setLoading(true);
}
}
start()
};
+4 -4
View File
@@ -7,8 +7,8 @@
android:angle="270"
android:centerColor="#ff5a5d5a"
android:centerY="0.75"
android:endColor="#ff747674"
android:startColor="#ff9d9e9d" />
android:endColor="#ff5a5d5a"
android:startColor="#ff5a5d5a" />
</shape>
</item>
@@ -20,7 +20,7 @@
android:angle="270"
android:centerColor="#80ffb600"
android:centerY="0.75"
android:endColor="#a0ffcb00"
android:endColor="#80ffd300"
android:startColor="#80ffd300" />
</shape>
</clip>
@@ -31,7 +31,7 @@
<corners android:radius="5dip" />
<gradient
android:angle="270"
android:endColor="#000080"
android:endColor="#3333FF"
android:startColor="#3333FF" />
</shape>
</clip>