fix: make Search watch admission recoverable (Closes #1295)
This commit is contained in:
1 parent
4fe07bcd52
commit
6c12731215
7 files changed
+213
-15
No files matched your search
@@ -48,6 +48,7 @@
|
||||
watching:'Starting watch…', unwatching:'Stopping watch…',
|
||||
watched:'Watching · available in Following. Future activity will appear in Updates.',
|
||||
unwatched:'Stopped watching · removed from Following. Assignment and planning are unchanged.',
|
||||
'watch-partial':'Watching in Gitea, but Following could not sync. Tap Stop watching, then Watch issue to repair.',
|
||||
'watch-error':(state.error?.message || 'Watch status was not changed.') + ' Retry.',
|
||||
})[state.status] || '';
|
||||
root.renderSearchPreviewWatch = (detail, state, button) => {
|
||||
@@ -385,7 +386,9 @@
|
||||
publish({ status:watching ? 'watching' : 'unwatching', item:current, detail });
|
||||
watchRequest = watch(detail, watching).then(result => {
|
||||
current = { ...current, watching:result?.watching === true };
|
||||
publish({ status:watching ? 'watched' : 'unwatched', item:current, detail:current, result });
|
||||
const status = result?.following_synced === false
|
||||
? 'watch-partial' : (watching ? 'watched' : 'unwatched');
|
||||
publish({ status, item:current, detail:current, result });
|
||||
return result;
|
||||
}).catch(error => {
|
||||
publish({ status:'watch-error', item:current, detail, error });
|
||||
|
||||
Reference in new issue
Block a user