Fech data from mam when all history gets displayed
Fetch from mam without displaying when all mam messages get received display new messages from db. Unstable, initial mam doesn't get displayed unless we start scrolling.
This commit is contained in:
@@ -602,8 +602,14 @@ win_page_up(ProfWin* window)
|
||||
|
||||
if (*page_start == -page_space && prefs_get_boolean(PREF_MAM) && window->type == WIN_CHAT) {
|
||||
ProfChatWin* chatwin = (ProfChatWin*) window;
|
||||
chatwin_old_history(chatwin);
|
||||
if (!chatwin_old_history(chatwin)) {
|
||||
cons_show("Fetched mam");
|
||||
iq_mam_request_older(chatwin);
|
||||
} else {
|
||||
cons_show("Showed history");
|
||||
}
|
||||
}
|
||||
|
||||
// went past beginning, show first page
|
||||
if (*page_start < 0)
|
||||
*page_start = 0;
|
||||
|
||||
Reference in New Issue
Block a user