From 9b6dc1318dfa4508bdd0eae290158574ffda4eec Mon Sep 17 00:00:00 2001 From: aayush262 Date: Mon, 8 Apr 2024 17:45:18 +0530 Subject: [PATCH] fix: idr --- .../connections/github/Contributors.kt | 20 ++-- .../java/ani/dantotsu/media/AuthorActivity.kt | 1 - .../media/anime/SelectorDialogFragment.kt | 1 - .../ani/dantotsu/settings/SettingsActivity.kt | 5 +- app/src/main/res/layout/activity_author.xml | 112 +++++++++--------- app/src/main/res/layout/item_character.xml | 17 +-- .../main/res/layout/item_profile_app_bar.xml | 31 ++--- 7 files changed, 91 insertions(+), 96 deletions(-) diff --git a/app/src/main/java/ani/dantotsu/connections/github/Contributors.kt b/app/src/main/java/ani/dantotsu/connections/github/Contributors.kt index f796e38a865..0c7ebef6d28 100644 --- a/app/src/main/java/ani/dantotsu/connections/github/Contributors.kt +++ b/app/src/main/java/ani/dantotsu/connections/github/Contributors.kt @@ -30,6 +30,16 @@ class Contributors { "Owner and Maintainer", first.htmlUrl ) + ) + } + res.filter {it.login != "rebelonion"}.forEach { + developers = developers.plus( + Developer( + it.login, + it.avatarUrl, + "Contributor", + it.htmlUrl + ) ).plus(arrayOf( Developer( "Wai What", @@ -57,16 +67,6 @@ class Contributors { ) )) } - res.filter {it.login != "rebelonion"}.forEach { - developers = developers.plus( - Developer( - it.login, - it.avatarUrl, - "Contributor", - it.htmlUrl - ) - ) - } } return developers } diff --git a/app/src/main/java/ani/dantotsu/media/AuthorActivity.kt b/app/src/main/java/ani/dantotsu/media/AuthorActivity.kt index 4b1c69024ef..eaea7794041 100644 --- a/app/src/main/java/ani/dantotsu/media/AuthorActivity.kt +++ b/app/src/main/java/ani/dantotsu/media/AuthorActivity.kt @@ -33,7 +33,6 @@ class AuthorActivity : AppCompatActivity() { private val model: OtherDetailsViewModel by viewModels() private var author: Author? = null private var loaded = false - private var isVoiceArtist: Boolean = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt b/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt index 5ecd8af7193..e203a77f649 100644 --- a/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt +++ b/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt @@ -433,7 +433,6 @@ class SelectorDialogFragment : BottomSheetDialogFragment() { val episode = media!!.anime!!.episodes!![media!!.anime!!.selectedEpisode!!]!! val selectedVideo = if (extractor.videos.size > episode.selectedVideo) extractor.videos[episode.selectedVideo] else null - val subtitles = extractor.subtitles val subtitleNames = subtitles.map { it.language } var subtitleToDownload: Subtitle? = null val activity = currActivity()?:requireActivity() diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt index 783153f4cf5..81278580297 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt @@ -109,7 +109,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene override fun handleOnBackPressed() = startMainActivity(this@SettingsActivity) } lateinit var binding: ActivitySettingsBinding - lateinit var launcher: LauncherWrapper + private lateinit var launcher: LauncherWrapper private lateinit var bindingAccounts: ActivitySettingsAccountsBinding private lateinit var bindingTheme: ActivitySettingsThemeBinding private lateinit var bindingExtensions: ActivitySettingsExtensionsBinding @@ -230,7 +230,6 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene PrefManager.getVal(PrefName.AnilistUserName) ) openLinkInBrowser(anilistLink) - true } settingsMALLoginRequired.visibility = View.GONE @@ -251,7 +250,6 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene it.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS) val myanilistLink = getString(R.string.myanilist_link, MAL.username) openLinkInBrowser(myanilistLink) - true } } else { settingsMALAvatar.setImageResource(R.drawable.ic_round_person_24) @@ -283,7 +281,6 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene it.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS) val discordLink = getString(R.string.discord_link, id) openLinkInBrowser(discordLink) - true } } settingsDiscordUsername.visibility = View.VISIBLE diff --git a/app/src/main/res/layout/activity_author.xml b/app/src/main/res/layout/activity_author.xml index e4dd731a8d8..61a5eb3bf5f 100644 --- a/app/src/main/res/layout/activity_author.xml +++ b/app/src/main/res/layout/activity_author.xml @@ -1,39 +1,38 @@ - - + android:layout_height="match_parent"> + + - + android:background="?attr/colorSurface"> - + - + @@ -47,67 +46,66 @@ android:padding="8dp" android:text="@string/characters" android:textSize="18sp" - android:visibility="gone" - tools:visibility="visible" /> + android:visibility="gone" /> - + tools:orientation="horizontal" + tools:visibility="visible" /> - - - - - - - - - + + + + + + + + + diff --git a/app/src/main/res/layout/item_character.xml b/app/src/main/res/layout/item_character.xml index 214964c8855..4f1ae505f3e 100644 --- a/app/src/main/res/layout/item_character.xml +++ b/app/src/main/res/layout/item_character.xml @@ -4,17 +4,18 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="-12dp" - android:layout_marginTop="-12dp" - android:layout_marginEnd="-12dp" + android:layout_marginStart="-16dp" + android:layout_marginEnd="-16dp" android:orientation="vertical"> + android:padding="22dp"> - - - - + android:layout_margin="20dp" + android:translationZ="2dp" + app:cardBackgroundColor="@color/nav_bg" + app:cardCornerRadius="16dp"> + + +