-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from 'mattcarter11/singelton-sync-and-chip-lo…
…ader' into 'dev' Uploaded Artists: fix fetching and displaying privately owned (uploaded) artists Also fixed: * not all chips syncing when being selected * don't sync if no connection. Finish sync if no error while fetching ytm data * when syncing playlist, exclude liked playlist by id, not by order * change text sort by date to sort by liked when songs liked filter is active
- Loading branch information
Showing
30 changed files
with
821 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
app/src/main/java/com/dd3boh/outertune/ui/component/shimmer/ArtistPagePlaceholder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.dd3boh.outertune.ui.component.shimmer | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.WindowInsets | ||
import androidx.compose.foundation.layout.asPaddingValues | ||
import androidx.compose.foundation.layout.aspectRatio | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.systemBars | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import com.dd3boh.outertune.constants.AppBarHeight | ||
import com.dd3boh.outertune.ui.utils.fadingEdge | ||
import com.valentinilk.shimmer.shimmer | ||
|
||
@Composable | ||
fun ArtistPagePlaceholder() { | ||
ShimmerHost { | ||
Box( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.aspectRatio(4f / 3) | ||
) { | ||
Spacer( | ||
modifier = Modifier | ||
.shimmer() | ||
.background(MaterialTheme.colorScheme.onSurface) | ||
.fadingEdge( | ||
top = WindowInsets.systemBars | ||
.asPaddingValues() | ||
.calculateTopPadding() + AppBarHeight, | ||
bottom = 108.dp | ||
) | ||
) | ||
TextPlaceholder( | ||
height = 56.dp, | ||
modifier = Modifier | ||
.align(Alignment.BottomCenter) | ||
.padding(horizontal = 48.dp) | ||
) | ||
} | ||
|
||
Row( | ||
modifier = Modifier.padding(12.dp) | ||
) { | ||
ButtonPlaceholder(Modifier.weight(1f)) | ||
|
||
Spacer(Modifier.width(12.dp)) | ||
|
||
ButtonPlaceholder(Modifier.weight(1f)) | ||
} | ||
|
||
repeat(6) { | ||
ListItemPlaceHolder() | ||
} | ||
} | ||
} |
Oops, something went wrong.