mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
fix: Extensions not retaining their repo url
This commit is contained in:
parent
44835ecb36
commit
6e1267d186
3 changed files with 14 additions and 2 deletions
|
@ -23,6 +23,7 @@
|
|||
- Improve download queue (AshbornXS)
|
||||
- Download badge now show download queue count
|
||||
- Add option to move series to bottom
|
||||
- Only show "open repo url" button when repo url is not empty
|
||||
|
||||
## Fixes
|
||||
- Fix potential crashes for some custom Android rom
|
||||
|
@ -31,6 +32,7 @@
|
|||
- Custom manga info now relink properly upon migration
|
||||
- Fixed extension repo list did not update when a repo is added via deep link
|
||||
- Fixed download unread trying to download filtered (by scanlator) chapters
|
||||
- Fixed extensions not retaining their repo url
|
||||
|
||||
## Other
|
||||
- Migrate `RawQueries#librayQuery` to use SQLDelight (`GetLibraryManga`), should improve stability
|
||||
|
|
|
@ -213,8 +213,12 @@ class ExtensionManager(
|
|||
repoUrl = availableExt.repoUrl,
|
||||
)
|
||||
hasUpdateCount++
|
||||
changed = true
|
||||
} else {
|
||||
mutInstalledExtensions[index] = installedExt.copy(
|
||||
repoUrl = availableExt.repoUrl,
|
||||
)
|
||||
}
|
||||
changed = true
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
|
|
|
@ -154,6 +154,12 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
|||
inflater.inflate(R.menu.extension_details, menu)
|
||||
}
|
||||
|
||||
override fun onPrepareOptionsMenu(menu: Menu) {
|
||||
val item = menu.findItem(R.id.action_open_repo)
|
||||
item.isVisible = presenter.extension?.repoUrl != null
|
||||
super.onPrepareOptionsMenu(menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.action_open_repo -> openRepo()
|
||||
|
@ -163,7 +169,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
|||
}
|
||||
|
||||
private fun openRepo() {
|
||||
val url = getUrl(presenter.extension?.repoUrl)
|
||||
val url = getUrl(presenter.extension?.repoUrl) ?: return
|
||||
openInBrowser(url)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue