From d0f99596ee45963808240b52026b22a03ecb8b9e Mon Sep 17 00:00:00 2001 From: CraftWorksMC Date: Thu, 23 May 2024 15:33:53 +0200 Subject: [PATCH] Fix bottom padding occasionally clipping useful stuff. --- .../java/com/craftworks/music/ui/elements/BottomSpacer.kt | 4 ++-- .../craftworks/music/ui/elements/dialogs/ProviderDialogs.kt | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/craftworks/music/ui/elements/BottomSpacer.kt b/app/src/main/java/com/craftworks/music/ui/elements/BottomSpacer.kt index 1602e7d..6105445 100755 --- a/app/src/main/java/com/craftworks/music/ui/elements/BottomSpacer.kt +++ b/app/src/main/java/com/craftworks/music/ui/elements/BottomSpacer.kt @@ -23,7 +23,7 @@ fun BottomSpacer(){ SongHelper.currentSong.duration == 0 && SongHelper.currentSong.imageUrl == Uri.EMPTY) { if (LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT) - 12.dp + 80.dp + 12.dp + 80.dp + WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding() else 0.dp } @@ -42,7 +42,7 @@ fun bottomSpacerHeightDp(): Dp { SongHelper.currentSong.duration == 0 && SongHelper.currentSong.imageUrl == Uri.EMPTY) { if (LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT) - 12.dp + 80.dp + 12.dp + 80.dp + WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding() else 0.dp } diff --git a/app/src/main/java/com/craftworks/music/ui/elements/dialogs/ProviderDialogs.kt b/app/src/main/java/com/craftworks/music/ui/elements/dialogs/ProviderDialogs.kt index 10bad4a..665525a 100644 --- a/app/src/main/java/com/craftworks/music/ui/elements/dialogs/ProviderDialogs.kt +++ b/app/src/main/java/com/craftworks/music/ui/elements/dialogs/ProviderDialogs.kt @@ -245,7 +245,9 @@ fun CreateMediaProviderDialog(setShowDialog: (Boolean) -> Unit, context: Context username = username.trim() password = password.trim() if (url.startsWith("https")){ - url = url.removeSuffix("/").trim() + ":443" + url = url.removeSuffix("/").trim() + if (!url.endsWith("443")) + url += ":443" } //saveManager(context).saveSettings() if (checkNavidromeURL(url, username, password)) {