[geary/wip/730682-refine-convo-list: 22/37] Increase initial conversation load to make initial scroll less janky.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/730682-refine-convo-list: 22/37] Increase initial conversation load to make initial scroll less janky.
- Date: Mon, 11 Dec 2017 21:14:26 +0000 (UTC)
commit 4220961420965c8e774507ae017351ed0894e117
Author: Michael James Gratton <mike vee net>
Date: Sun Oct 15 08:04:38 2017 +1030
Increase initial conversation load to make initial scroll less janky.
src/client/application/geary-controller.vala | 14 +++++++++-----
src/client/components/main-window.vala | 2 +-
2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 3bfd138..db2f319 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -50,7 +50,7 @@ public class GearyController : Geary.BaseObject {
// Properties
public const string PROP_CURRENT_CONVERSATION ="current-conversations";
- public const int MIN_CONVERSATION_COUNT = 50;
+ internal const int CONVERSATION_PAGE_SIZE = 50;
private const int SELECT_FOLDER_TIMEOUT_USEC = 100 * 1000;
@@ -1332,10 +1332,14 @@ public class GearyController : Geary.BaseObject {
}
update_ui();
-
- current_conversations = new Geary.App.ConversationMonitor(current_folder,
Geary.Folder.OpenFlags.NO_DELAY,
- ConversationListStore.REQUIRED_FIELDS, MIN_CONVERSATION_COUNT);
-
+
+ current_conversations = new Geary.App.ConversationMonitor(
+ current_folder,
+ Geary.Folder.OpenFlags.NO_DELAY,
+ ConversationListStore.REQUIRED_FIELDS,
+ CONVERSATION_PAGE_SIZE * 2 // load double up front when not scrolling
+ );
+
if (inboxes.values.contains(current_folder)) {
// Inbox selected, clear new messages if visible
clear_new_messages("do_select_folder (inbox)", null);
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index c808f6d..67baffb 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -514,7 +514,7 @@ public class MainWindow : Gtk.ApplicationWindow {
private void on_load_more() {
debug("on_load_more");
- this.application.controller.current_conversations.min_window_count +=
GearyController.MIN_CONVERSATION_COUNT;
+ this.application.controller.current_conversations.min_window_count +=
GearyController.CONVERSATION_PAGE_SIZE;
}
private void on_scan_error(Error err) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]