Commit 21dc8a90 authored by Amin Bandali's avatar Amin Bandali

chatview: support for lazy loading swarm conversations with client-gnome

Change-Id: I0d2a5f9208c44b0b03b9c65047ef09dad6d43979
parent 036b4013
......@@ -262,8 +262,13 @@ function onScrolled_() {
}
}
if (messages.scrollTop === 0)
window.jsbridge.loadMessages(scrollBuffer)
if (messages.scrollTop === 0) {
if (use_qt) {
window.jsbridge.loadMessages(scrollBuffer)
} else {
window.prompt(`LOAD_MESSAGES:${scrollBuffer}`)
}
}
}
const debounce = (fn, time) => {
......@@ -2446,8 +2451,13 @@ function updateHistory(messages_array, all_loaded)
printHistoryPart(messages, messages.scrollHeight, all_loaded)
canLazyLoad = true
if (messages.scrollTop === 0)
window.jsbridge.loadMessages(scrollBuffer)
if (messages.scrollTop === 0) {
if (use_qt) {
window.jsbridge.loadMessages(scrollBuffer)
} else {
window.prompt(`LOAD_MESSAGES:${scrollBuffer}`)
}
}
if (use_qt) {
window.jsbridge.emitMessagesLoaded()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment