🥰 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 { patchPluginXml {
sinceBuild.set("222") sinceBuild.set("213")
untilBuild.set("222.*") untilBuild.set("222.*")
} }

View file

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