feat: remove predefined repo links
This commit is contained in:
parent
899af3ee1a
commit
0052eba828
4 changed files with 14 additions and 23 deletions
|
@ -482,13 +482,12 @@ class HomeFragment : Fragment() {
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
model.setListImages()
|
model.setListImages()
|
||||||
}
|
}
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
|
||||||
model.initUserStatus()
|
|
||||||
}
|
|
||||||
var empty = true
|
var empty = true
|
||||||
val homeLayoutShow: List<Boolean> =
|
val homeLayoutShow: List<Boolean> =
|
||||||
PrefManager.getVal(PrefName.HomeLayout)
|
PrefManager.getVal(PrefName.HomeLayout)
|
||||||
model.initHomePage()
|
model.initHomePage()
|
||||||
|
model.initUserStatus()
|
||||||
(array.indices).forEach { i ->
|
(array.indices).forEach { i ->
|
||||||
if (homeLayoutShow.elementAt(i)) {
|
if (homeLayoutShow.elementAt(i)) {
|
||||||
empty = false
|
empty = false
|
||||||
|
|
|
@ -305,10 +305,10 @@ class SettingsCommonActivity : AppCompatActivity() {
|
||||||
desc = getString(R.string.change_download_location_desc),
|
desc = getString(R.string.change_download_location_desc),
|
||||||
icon = R.drawable.ic_round_source_24,
|
icon = R.drawable.ic_round_source_24,
|
||||||
onClick = {
|
onClick = {
|
||||||
val dialog = AlertDialog.Builder(context, R.style.MyPopup)
|
context.customAlertDialog().apply{
|
||||||
.setTitle(R.string.change_download_location)
|
setTitle(R.string.change_download_location)
|
||||||
.setMessage(R.string.download_location_msg)
|
setMessage(R.string.download_location_msg)
|
||||||
.setPositiveButton(R.string.ok) { dialog, _ ->
|
setPosButton(R.string.ok){
|
||||||
val oldUri = PrefManager.getVal<String>(PrefName.DownloadsDir)
|
val oldUri = PrefManager.getVal<String>(PrefName.DownloadsDir)
|
||||||
launcher.registerForCallback { success ->
|
launcher.registerForCallback { success ->
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -331,12 +331,10 @@ class SettingsCommonActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
launcher.launch()
|
launcher.launch()
|
||||||
dialog.dismiss()
|
}
|
||||||
}.setNeutralButton(R.string.cancel) { dialog, _ ->
|
setNegButton(R.string.cancel)
|
||||||
dialog.dismiss()
|
show()
|
||||||
}.create()
|
}
|
||||||
dialog.window?.setDimAmount(0.8f)
|
|
||||||
dialog.show()
|
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
Settings(
|
Settings(
|
||||||
|
|
|
@ -64,10 +64,6 @@ internal class ExtensionGithubApi {
|
||||||
|
|
||||||
val repos =
|
val repos =
|
||||||
PrefManager.getVal<Set<String>>(PrefName.AnimeExtensionRepos).toMutableList()
|
PrefManager.getVal<Set<String>>(PrefName.AnimeExtensionRepos).toMutableList()
|
||||||
if (repos.isEmpty()) {
|
|
||||||
repos.add("https://raw.githubusercontent.com/aniyomiorg/aniyomi-extensions/repo")
|
|
||||||
PrefManager.setVal(PrefName.AnimeExtensionRepos, repos.toSet())
|
|
||||||
}
|
|
||||||
|
|
||||||
repos.forEach {
|
repos.forEach {
|
||||||
try {
|
try {
|
||||||
|
@ -157,10 +153,6 @@ internal class ExtensionGithubApi {
|
||||||
|
|
||||||
val repos =
|
val repos =
|
||||||
PrefManager.getVal<Set<String>>(PrefName.MangaExtensionRepos).toMutableList()
|
PrefManager.getVal<Set<String>>(PrefName.MangaExtensionRepos).toMutableList()
|
||||||
if (repos.isEmpty()) {
|
|
||||||
repos.add("https://raw.githubusercontent.com/keiyoushi/extensions/main")
|
|
||||||
PrefManager.setVal(PrefName.MangaExtensionRepos, repos.toSet())
|
|
||||||
}
|
|
||||||
|
|
||||||
repos.forEach {
|
repos.forEach {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:layout_marginBottom="67dp"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
@ -50,15 +51,15 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:nestedScrollingEnabled="true"
|
android:nestedScrollingEnabled="true"
|
||||||
tools:ignore="SpeakableTextPresentCheck" />
|
tools:ignore="SpeakableTextPresentCheck" />
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<nl.joery.animatedbottombar.AnimatedBottomBar
|
<nl.joery.animatedbottombar.AnimatedBottomBar
|
||||||
android:id="@+id/notificationNavBar"
|
android:id="@+id/notificationNavBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
android:layout_marginTop="-64dp"
|
android:layout_marginTop="-67dp"
|
||||||
android:background="?attr/colorSurface"
|
android:background="?attr/colorSurface"
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
app:abb_animationInterpolator="@anim/over_shoot"
|
app:abb_animationInterpolator="@anim/over_shoot"
|
||||||
|
@ -73,4 +74,5 @@
|
||||||
app:itemTextAppearanceActive="@style/NavBarText"
|
app:itemTextAppearanceActive="@style/NavBarText"
|
||||||
app:itemTextAppearanceInactive="@style/NavBarText"
|
app:itemTextAppearanceInactive="@style/NavBarText"
|
||||||
app:itemTextColor="@color/tab_layout_icon" />
|
app:itemTextColor="@color/tab_layout_icon" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Add table
Add a link
Reference in a new issue