From d2d520336bfb0b658d460f5d071a0de11fd3bb98 Mon Sep 17 00:00:00 2001
From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com>
Date: Sat, 12 Oct 2019 13:31:10 +0200
Subject: [PATCH] change sorting of rspamd symbols in quarantine

---
 data/web/js/site/quarantine.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/data/web/js/site/quarantine.js b/data/web/js/site/quarantine.js
index b1c0bc83..6364b579 100644
--- a/data/web/js/site/quarantine.js
+++ b/data/web/js/site/quarantine.js
@@ -98,6 +98,12 @@ jQuery(function($){
           data.symbols.sort(function (a, b) {
             if (a.score === 0) return 1
             if (b.score === 0) return -1
+            if (b.score < 0 && a.score < 0) {
+              return a.score - b.score
+            }
+            if (b.score > 0 && a.score > 0) {
+              return b.score - a.score
+            }
             return b.score - a.score
           })
           $.each(data.symbols, function (index, value) {