mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-30 01:22:56 +01:00
fix(tv): replace season sheet with advanced request modal, not stack it
When a user has advanced-request permission, the season-select sheet opened the advanced request modal via router.back() + push(). back() is batched, so the push landed first and the advanced sheet stacked on top of the season sheet, breaking focus. Add a `replace` option to showRequestModal and use it here so the advanced modal takes the season sheet's place in the stack. Claude-Session: https://claude.ai/code/session_016Hhu5DruGLPhdP4LAoy1Xd
This commit is contained in:
@@ -257,14 +257,15 @@ export default function TVSeasonSelectModalPage() {
|
||||
};
|
||||
|
||||
if (modalState.hasAdvancedRequestPermission) {
|
||||
// Close this modal and open the advanced request modal
|
||||
router.back();
|
||||
// Replace this sheet with the advanced request modal so it takes our
|
||||
// place in the stack instead of stacking on top (which breaks focus).
|
||||
showRequestModal({
|
||||
requestBody: body,
|
||||
title: modalState.title,
|
||||
id: modalState.mediaId,
|
||||
mediaType: MediaType.TV,
|
||||
onRequested: modalState.onRequested,
|
||||
replace: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user