From d3fc4b495dc10beab82794e7189329daed2c04eb Mon Sep 17 00:00:00 2001
From: yattoz <12408848+yattoz@users.noreply.github.com>
Date: Sun, 12 Jan 2020 18:16:56 +0100
Subject: [PATCH 1/2] fixed layout and reverted song copy to internal copy
---
.../fr/forum_thalie/tsumugi/playerstore/PlayerStore.kt | 6 +++---
.../java/fr/forum_thalie/tsumugi/playerstore/Song.kt | 3 ++-
app/src/main/res/layout/fragment_nowplaying.xml | 10 +++++-----
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/PlayerStore.kt b/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/PlayerStore.kt
index df4c151..76c4e2b 100644
--- a/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/PlayerStore.kt
+++ b/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/PlayerStore.kt
@@ -46,8 +46,8 @@ class PlayerStore {
isQueueUpdated.value = false
isLpUpdated.value = false
isMuted.value = false
- currentSong.title.value = noConnectionValue
- currentSongBackup.title.value = noConnectionValue
+ currentSong.setTitleArtist(noConnectionValue)
+ currentSongBackup.setTitleArtist(noConnectionValue)
listenersCount.value = 0
}
@@ -181,7 +181,7 @@ class PlayerStore {
//if (lp.isNotEmpty()){
val n = Song()
n.copy(currentSongBackup)
- if (n.title.value != noConnectionValue && n.title.value != streamDownValue)
+ if (n != Song(noConnectionValue) && n != Song(streamDownValue))
lp.add(0, n)
currentSongBackup.copy(currentSong)
isLpUpdated.value = true
diff --git a/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/Song.kt b/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/Song.kt
index ea97982..ef30c4b 100644
--- a/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/Song.kt
+++ b/app/src/main/java/fr/forum_thalie/tsumugi/playerstore/Song.kt
@@ -52,7 +52,8 @@ class Song(artistTitle: String = "", _id : Int = 0) {
}
fun copy(song: Song) {
- this.setTitleArtist(song.artist.value + " - " + song.title.value)
+ this.artist.value = song.artist.value
+ this.title. value = song.title.value
this.startTime.value = song.startTime.value
this.stopTime.value = song.stopTime.value
this.type.value = song.type.value
diff --git a/app/src/main/res/layout/fragment_nowplaying.xml b/app/src/main/res/layout/fragment_nowplaying.xml
index efaee16..35f5f80 100644
--- a/app/src/main/res/layout/fragment_nowplaying.xml
+++ b/app/src/main/res/layout/fragment_nowplaying.xml
@@ -36,7 +36,7 @@
android:contentDescription="dj-image"
android:scaleType="fitStart"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/scrollViewMetadataNext"
app:layout_constraintStart_toStartOf="@id/imageGuideline"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/logo_roundsquare"
@@ -160,7 +160,7 @@
app:layout_constraintEnd_toStartOf="@id/streamerPicture"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/seek_bar_volume"
- app:layout_constraintVertical_weight="3">
+ >
@@ -218,14 +218,14 @@
+ >
Date: Sun, 12 Jan 2020 18:23:16 +0100
Subject: [PATCH 2/2] version bump 112
---
app/build.gradle | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 027c21f..4f75cf7 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -29,8 +29,8 @@ android {
applicationId "fr.forum_thalie.tsumugi"
minSdkVersion 16
targetSdkVersion 29
- versionCode 111
- versionName "1.1.1"
+ versionCode 112
+ versionName "1.1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}