Skip to content

Commit 325f12c

Browse files
author
Scarwolf
committed
Fix Broken Comments
1 parent 934d563 commit 325f12c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"TamperMonkey",
1212
"pr0gramm"
1313
],
14-
"version": "1.7.5",
14+
"version": "1.7.6",
1515
"license": "GPL-3.0",
1616
"dependencies": {
1717
"chart.js": "^2.9.4",

src/module/WidescreenMode.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,19 @@ export default class WidescreenMode {
296296
}
297297
});
298298

299+
p.View.Stream.Comments.SortConfidenceTime = (itemUser) => function (a, b) {
300+
if (a.confidence >= 0.2 && itemUser === a.name && itemUser !== b.name) {
301+
return -1;
302+
} else if (b.confidence >= 0.2 && itemUser === b.name && itemUser !== a.name) {
303+
return 1;
304+
}
305+
return (b.confidence === a.confidence ? a.created - b.created : b.confidence - a.confidence);
306+
};
307+
308+
p.View.Stream.Comments.SortTime = function (a, b) {
309+
return (a.created - b.created);
310+
};
311+
299312
// Handle stream-building
300313
p.View.Stream.Main.prototype.buildItemRows = function (items) {
301314
let result = '';

0 commit comments

Comments
 (0)