Browse Source

fixed layout and reverted song copy to internal copy

yattoz 5 years ago
parent
commit
d3fc4b495d

+ 3 - 3
app/src/main/java/fr/forum_thalie/tsumugi/playerstore/PlayerStore.kt View File

46
         isQueueUpdated.value = false
46
         isQueueUpdated.value = false
47
         isLpUpdated.value = false
47
         isLpUpdated.value = false
48
         isMuted.value = false
48
         isMuted.value = false
49
-        currentSong.title.value = noConnectionValue
50
-        currentSongBackup.title.value = noConnectionValue
49
+        currentSong.setTitleArtist(noConnectionValue)
50
+        currentSongBackup.setTitleArtist(noConnectionValue)
51
         listenersCount.value = 0
51
         listenersCount.value = 0
52
     }
52
     }
53
 
53
 
181
         //if (lp.isNotEmpty()){
181
         //if (lp.isNotEmpty()){
182
             val n = Song()
182
             val n = Song()
183
             n.copy(currentSongBackup)
183
             n.copy(currentSongBackup)
184
-            if (n.title.value != noConnectionValue && n.title.value != streamDownValue)
184
+            if (n != Song(noConnectionValue) && n != Song(streamDownValue))
185
                 lp.add(0, n)
185
                 lp.add(0, n)
186
             currentSongBackup.copy(currentSong)
186
             currentSongBackup.copy(currentSong)
187
             isLpUpdated.value = true
187
             isLpUpdated.value = true

+ 2 - 1
app/src/main/java/fr/forum_thalie/tsumugi/playerstore/Song.kt View File

52
     }
52
     }
53
 
53
 
54
     fun copy(song: Song) {
54
     fun copy(song: Song) {
55
-        this.setTitleArtist(song.artist.value + " - " + song.title.value)
55
+        this.artist.value = song.artist.value
56
+        this.title. value = song.title.value
56
         this.startTime.value = song.startTime.value
57
         this.startTime.value = song.startTime.value
57
         this.stopTime.value = song.stopTime.value
58
         this.stopTime.value = song.stopTime.value
58
         this.type.value = song.type.value
59
         this.type.value = song.type.value

+ 5 - 5
app/src/main/res/layout/fragment_nowplaying.xml View File

36
             android:contentDescription="dj-image"
36
             android:contentDescription="dj-image"
37
             android:scaleType="fitStart"
37
             android:scaleType="fitStart"
38
             app:layout_constraintEnd_toEndOf="parent"
38
             app:layout_constraintEnd_toEndOf="parent"
39
-            app:layout_constraintBottom_toBottomOf="parent"
39
+            app:layout_constraintBottom_toBottomOf="@id/scrollViewMetadataNext"
40
             app:layout_constraintStart_toStartOf="@id/imageGuideline"
40
             app:layout_constraintStart_toStartOf="@id/imageGuideline"
41
             app:layout_constraintTop_toTopOf="parent"
41
             app:layout_constraintTop_toTopOf="parent"
42
             app:srcCompat="@drawable/logo_roundsquare"
42
             app:srcCompat="@drawable/logo_roundsquare"
160
             app:layout_constraintEnd_toStartOf="@id/streamerPicture"
160
             app:layout_constraintEnd_toStartOf="@id/streamerPicture"
161
             app:layout_constraintStart_toStartOf="parent"
161
             app:layout_constraintStart_toStartOf="parent"
162
             app:layout_constraintTop_toBottomOf="@id/seek_bar_volume"
162
             app:layout_constraintTop_toBottomOf="@id/seek_bar_volume"
163
-            app:layout_constraintVertical_weight="3">
163
+            >
164
 
164
 
165
 
165
 
166
             <androidx.constraintlayout.widget.ConstraintLayout
166
             <androidx.constraintlayout.widget.ConstraintLayout
180
                     android:text="@string/up_next"
180
                     android:text="@string/up_next"
181
                     android:textAlignment="center"
181
                     android:textAlignment="center"
182
                     android:textColor="@color/whited5"
182
                     android:textColor="@color/whited5"
183
-                    android:layout_marginTop="8dp"
183
+                    android:layout_marginTop="0dp"
184
                     app:layout_constraintStart_toStartOf="parent"
184
                     app:layout_constraintStart_toStartOf="parent"
185
                     app:layout_constraintEnd_toEndOf="parent"
185
                     app:layout_constraintEnd_toEndOf="parent"
186
                     app:layout_constraintTop_toTopOf="parent" />
186
                     app:layout_constraintTop_toTopOf="parent" />
218
         <ScrollView
218
         <ScrollView
219
             android:id="@+id/scrollProgramme"
219
             android:id="@+id/scrollProgramme"
220
             android:layout_width="0dp"
220
             android:layout_width="0dp"
221
-            android:layout_height="0dp"
221
+            android:layout_height="wrap_content"
222
             android:fillViewport="true"
222
             android:fillViewport="true"
223
             android:layout_marginBottom="0dp"
223
             android:layout_marginBottom="0dp"
224
             app:layout_constraintEnd_toEndOf="parent"
224
             app:layout_constraintEnd_toEndOf="parent"
225
             app:layout_constraintStart_toStartOf="parent"
225
             app:layout_constraintStart_toStartOf="parent"
226
             app:layout_constraintTop_toBottomOf="@id/scrollViewMetadataNext"
226
             app:layout_constraintTop_toBottomOf="@id/scrollViewMetadataNext"
227
             app:layout_constraintBottom_toBottomOf="@id/topInfoGuideline"
227
             app:layout_constraintBottom_toBottomOf="@id/topInfoGuideline"
228
-            app:layout_constraintVertical_weight="1">
228
+            >
229
 
229
 
230
 
230
 
231
         <androidx.constraintlayout.widget.ConstraintLayout
231
         <androidx.constraintlayout.widget.ConstraintLayout