[ui] invokes libnotify.notify_notification_show() from a background thread to prevent UI freezes (EA-210502)

GitOrigin-RevId: 822f000c94495bf90e32ead592f81b069eaa5e3a
This commit is contained in:
Roman Shevchenko
2019-08-22 01:50:10 +03:00
committed by intellij-monorepo-bot
parent d1c48a3bb5
commit dd123f6c51
@@ -62,11 +62,13 @@ class LibNotifyWrapper implements SystemNotificationsImpl.Notifier {
@Override
public void notify(@NotNull String name, @NotNull String title, @NotNull String description) {
synchronized (myLock) {
if (!myDisposed) {
Pointer notification = myLibNotify.notify_notification_new(title, description, myIcon);
myLibNotify.notify_notification_show(notification, null);
ApplicationManager.getApplication().executeOnPooledThread(() -> {
synchronized (myLock) {
if (!myDisposed) {
Pointer notification = myLibNotify.notify_notification_new(title, description, myIcon);
myLibNotify.notify_notification_show(notification, null);
}
}
}
});
}
}