From 5a2840e86ad116663a7344ed3fc451bf48fb760b Mon Sep 17 00:00:00 2001 From: AkshayWarrier <58233418+AkshayWarrier@users.noreply.github.com> Date: Sun, 20 Aug 2023 23:38:33 +0530 Subject: [PATCH] Memory Monitor: Change else ifs to ifs (#516) * library: Add Memory Monitor entry * Update main.json * Update main.blp * Memory Monitor: Suggestions * Memory Monitor: Change else ifs to ifs --- src/Library/demos/Memory Monitor/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Library/demos/Memory Monitor/main.js b/src/Library/demos/Memory Monitor/main.js index 1f050c83b..0339d0c4e 100644 --- a/src/Library/demos/Memory Monitor/main.js +++ b/src/Library/demos/Memory Monitor/main.js @@ -13,10 +13,12 @@ memory_monitor.connect("low-memory-warning", (monitor, level) => { // Processes should free up unneeded resources console.log("Warning Level: Low"); drop_caches(); - } else if (level >= Gio.MemoryMonitorWarningLevel.MEDIUM) { + } + if (level >= Gio.MemoryMonitorWarningLevel.MEDIUM) { // Processes should try harder to free up unneeded resources console.log("Warning Level: Medium"); - } else if (level >= Gio.MemoryMonitorWarningLevel.CRITICAL) { + } + if (level >= Gio.MemoryMonitorWarningLevel.CRITICAL) { // system will start terminating processes to reclaim memory console.log("Warning Level: Critical"); }