You've already forked AstralRinth
forked from didirus/AstralRinth
Bug fixes (#406)
* skip duplicates * slash, exports * fullscreen, exports * more bugs * fixed mac title bar * filters should go to top of page when changed * mac err, loading bars * temporary comments * moving to mac * bug fixes, fmt, prettier * review fixes * rev fixes
This commit is contained in:
@@ -98,7 +98,13 @@ const confirmClose = async () => {
|
||||
}
|
||||
|
||||
const handleClose = async () => {
|
||||
const isSafe = await check_safe_loading_bars_complete()
|
||||
// State should respond immeiately if it's safe to close
|
||||
// If not, code is deadlocked or worse, so wait 2 seconds and then ask the user to confirm closing
|
||||
// (Exception: if the user is changing config directory, which takes control of the state, and it's taking a significant amount of time for some reason)
|
||||
const isSafe = await Promise.race([
|
||||
check_safe_loading_bars_complete(),
|
||||
new Promise((r) => setTimeout(r, 2000)),
|
||||
])
|
||||
if (!isSafe) {
|
||||
const response = await confirmClose()
|
||||
if (!response) {
|
||||
|
||||
Reference in New Issue
Block a user