Skip to content

Commit

Permalink
Fix bug in notifications with tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maingron committed Nov 21, 2020
1 parent b62653e commit c7bd489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Program Files/notifications/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function is_online() {
function send_notification(title, content) {
parent.savefile(parent.setting.userdata + "Notifications/Notification History.log", parent.loadfile(parent.setting.userdata + "Notifications/Notification History.log") + parent.setting.time.full + "\n" + title + "\n" + content + "\n\n");
content = content.replace(/\n/g, '<br>');
content = content.replace(/\t/g, '&emsp;');
notifications.push("{\"title\":\"" + title + "\",\"content\":\"" + content + "\"}");
parent.savefile(parent.setting.userdata + "Notifications/notifications.txt", notifications, 1, "t=txt");
refreshNotifications()
Expand Down Expand Up @@ -94,7 +95,7 @@ setTimeout(function() {

document.documentElement.style.setProperty("--font", parent.setting.font);

if (parent.loadfile(parent.setting.userdata + "notifications/notify_changelog.dat") !== "") {
send_notification("Changes to MainOS - What's new:", parent.loadfile(parent.loadfile(parent.setting.userdata + "notifications/notify_changelog.dat")));
parent.savefile(parent.setting.userdata + "notifications/notify_changelog.dat", "", 1, "t=txt");
if (parent.loadfile(parent.setting.userdata + "Notifications/notify_changelog.dat") !== "") {
send_notification("Changes to MainOS - What's new:", parent.loadfile(parent.loadfile(parent.setting.userdata + "Notifications/notify_changelog.dat")));
parent.savefile(parent.setting.userdata + "Notifications/notify_changelog.dat", "", 1, "t=txt");
}
5 changes: 2 additions & 3 deletions mainos/createiofs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7bd489

Please sign in to comment.