🥰 Fix basmalh Notification and suport 213 api and ide 2022.2 💙

This commit is contained in:
Anas Elgarhy 2022-08-21 10:05:32 +02:00
parent a35ba60b7d
commit f1e1047ebc
2 changed files with 7 additions and 4 deletions

View file

@ -39,7 +39,7 @@ tasks {
}
patchPluginXml {
sinceBuild.set("222")
sinceBuild.set("213")
untilBuild.set("222.*")
}

View file

@ -23,12 +23,15 @@ public enum NotificationTimer {
}
public void start(@NotNull Project project) {
notificationTimerTask.setProject(project);
timer.schedule(notificationTimerTask, 0,
(long) AyahSettingsState.getInstance().getIntervalTimeBetweenNotifications() * 60 * 1000);
schedule(AyahSettingsState.getInstance().getIntervalTimeBetweenNotifications());
}
public void updateIntervalTimeBetweenNotifications(final int intervalTimeBetweenNotifications) {
timer.cancel();
timer.schedule(notificationTimerTask, 0, (long) intervalTimeBetweenNotifications * 60 * 1000);
schedule(intervalTimeBetweenNotifications);
}
private void schedule(final long intervalTimeBetweenNotifications) {
timer.schedule(notificationTimerTask, 1000, intervalTimeBetweenNotifications * 60 * 1000);
}
}