Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to not repeat popup message of locked up funds from failed trade #5771

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion desktop/src/main/java/bisq/desktop/main/MainViewModel.java
Expand Up @@ -77,11 +77,15 @@
import bisq.common.app.DevEnv;
import bisq.common.app.Version;
import bisq.common.config.Config;
import bisq.common.crypto.Hash;
import bisq.common.file.CorruptedStorageFileHandler;
import bisq.common.util.Hex;
import bisq.common.util.Tuple2;

import com.google.inject.Inject;

import com.google.common.base.Charsets;

import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.monadic.MonadicBinding;

Expand Down Expand Up @@ -340,7 +344,15 @@ private void setupHandlers() {
bisqSetup.setChainFileLockedExceptionHandler(msg -> new Popup().warning(msg)
.useShutDownButton()
.show());
bisqSetup.setLockedUpFundsHandler(msg -> new Popup().width(850).warning(msg).show());
bisqSetup.setLockedUpFundsHandler(msg -> {
// repeated popups of the same message text can be stopped by selecting the "Dont show again" checkbox
String key = Hex.encode(Hash.getSha256Ripemd160hash(msg.getBytes(Charsets.UTF_8)));
if (preferences.showAgain(key)) {
new Popup().width(850).warning(msg)
.dontShowAgainId(key)
.show();
}
});
bisqSetup.setShowFirstPopupIfResyncSPVRequestedHandler(this::showFirstPopupIfResyncSPVRequested);
bisqSetup.setRequestWalletPasswordHandler(aesKeyHandler -> walletPasswordWindow
.onAesKey(aesKeyHandler::accept)
Expand Down