From d01a9fe3f0f0c34b8384252e92535933bb8a8847 Mon Sep 17 00:00:00 2001
From: Janne Koschinski <janne@kuschku.de>
Date: Sat, 3 Mar 2018 15:02:16 +0100
Subject: [PATCH] Fixed minor loading issue

---
 res/js/component/app.js      | 4 ++--
 res/js/component/app.jsx     | 4 ++--
 res/js/component/context.js  | 4 ++--
 res/js/component/context.jsx | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/res/js/component/app.js b/res/js/component/app.js
index 14a75e9..457a45e 100644
--- a/res/js/component/app.js
+++ b/res/js/component/app.js
@@ -127,8 +127,8 @@ class App {
             after: 4,
             before: 4
         })).then(result => {
-            const before = result.filter(msg => msg.id < context.anchorBefore);
-            const after = result.filter(msg => msg.id > context.anchorAfter);
+            const before = result.filter(msg => msg.messageid < context.anchorBefore);
+            const after = result.filter(msg => msg.messageid > context.anchorAfter);
             context.loadBefore(before.map(msg => new Message(msg.messageid, msg.time, msg.sender, msg.message)));
             context.loadAfter(after.map(msg => new Message(msg.messageid, msg.time, msg.sender, msg.message)));
             context.setLoading(false);
diff --git a/res/js/component/app.jsx b/res/js/component/app.jsx
index 438ee46..bc70e02 100644
--- a/res/js/component/app.jsx
+++ b/res/js/component/app.jsx
@@ -139,8 +139,8 @@ class App {
             after: 4,
             before: 4
         })).then((result) => {
-            const before = result.filter((msg) => msg.id < context.anchorBefore);
-            const after = result.filter((msg) => msg.id > context.anchorAfter);
+            const before = result.filter((msg) => msg.messageid < context.anchorBefore);
+            const after = result.filter((msg) => msg.messageid > context.anchorAfter);
 
             context.loadBefore(before.map((msg) => new Message(msg.messageid, msg.time, msg.sender, msg.message)));
             context.loadAfter(after.map((msg) => new Message(msg.messageid, msg.time, msg.sender, msg.message)));
diff --git a/res/js/component/context.js b/res/js/component/context.js
index 1508987..7381f1e 100644
--- a/res/js/component/context.js
+++ b/res/js/component/context.js
@@ -37,7 +37,7 @@ class Context extends Component {
         if (focus === undefined)
             focus = !this.elem.classList.contains('focus');
         if (this.anchorBefore === this.message.id && this.anchorAfter === this.message.id) {
-            this.triggerloadInitial();
+            this.triggerLoadInitial();
         }
         this.elem.classList.toggle('focus', focus);
         this.sendEvent('focus', focus);
@@ -57,7 +57,7 @@ class Context extends Component {
     triggerLoadAfter() {
         this.sendEvent('loadAfter', [this]);
     }
-    triggerloadInitial() {
+    triggerLoadInitial() {
         this.sendEvent('loadInitial', [this]);
     }
     loadBefore(elements) {
diff --git a/res/js/component/context.jsx b/res/js/component/context.jsx
index 143fd57..721698f 100644
--- a/res/js/component/context.jsx
+++ b/res/js/component/context.jsx
@@ -42,7 +42,7 @@ class Context extends Component {
             focus = !this.elem.classList.contains("focus");
 
         if (this.anchorBefore === this.message.id && this.anchorAfter === this.message.id) {
-            this.triggerloadInitial();
+            this.triggerLoadInitial();
         }
 
         this.elem.classList.toggle("focus", focus);
@@ -68,7 +68,7 @@ class Context extends Component {
         this.sendEvent("loadAfter", [this]);
     }
 
-    triggerloadInitial() {
+    triggerLoadInitial() {
         this.sendEvent("loadInitial", [this]);
     }
 
-- 
GitLab