Two more bug fixes (#1521)
## Description Fixes bugs: - Follow up to #1487 since the 404 exception can be ignored in some cases - Fixes a only-on-main-thread exception when clearing the secure flag in some cases ### Related issues Related to #1469 ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
0842c35e34
commit
e2a6ae6be4
2 changed files with 25 additions and 14 deletions
|
|
@ -553,8 +553,10 @@ class HomeSettingsService
|
|||
): StringProvider =
|
||||
try {
|
||||
api.userLibraryApi
|
||||
.getItem(itemId = itemId)
|
||||
.content.name
|
||||
.getItem(
|
||||
userId = serverRepository.currentUser?.id,
|
||||
itemId = itemId,
|
||||
).content.name
|
||||
?.let {
|
||||
if (stringRes == null) {
|
||||
StringStringProvider(it)
|
||||
|
|
@ -876,8 +878,15 @@ class HomeSettingsService
|
|||
fields = DefaultItemFields,
|
||||
)
|
||||
|
||||
// Not using getItemName because we want to throw the 404
|
||||
val title =
|
||||
getItemName(null, row.parentId, ResStringProvider(R.string.collection))
|
||||
api.userLibraryApi
|
||||
.getItem(
|
||||
userId = serverRepository.currentUser?.id,
|
||||
itemId = row.parentId,
|
||||
).content.name
|
||||
?.let { StringStringProvider(it) }
|
||||
?: ResStringProvider(R.string.collection)
|
||||
if (usePaging) {
|
||||
ApiRequestPager(
|
||||
api,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue