-
Notifications
You must be signed in to change notification settings - Fork 246
Show unread counts and add bankruptcy option. #430
base: master
Are you sure you want to change the base?
Conversation
Fixes #326
So the main potential downside of fetching 1000 messages on startup is performance when on a slow network; to what extent have you tested that? It might actually be fine with compression, but we should be sure :) |
So I think with a 35Mbps connection, it'll be fine either way. For this, we want to test with a relatively slow connection. We could do something simpler than doing 5 batches of 200, like fetch 200 at first (to show something) and then fetch the next 800. The thing that's really important to optimize here is the time-to-first-interaction, but there's not much reason to do 5 rounds over 2. |
ok got it, I'll update the pr with fetching 200 first and displaying it. Following this, in the background 800 messages can be fetched and added to the bottom of the list. During this time, the user will be able to interact with those 200 messages in the list. These 800 messages loaded in background could probably be fetched in a single call. Would that be fine? |
Yep, fetching 800 in one call makes sense. FWIW the webapp does roughly that with 400 and 1000 as the parameters, so it's a pretty similar algorithm. |
@@ -30,7 +30,7 @@ | |||
private static final String DATABASE_NAME = "zulip-%s.db"; | |||
// any time you make changes to your database objects, you may have to | |||
// increase the database version | |||
private static final int DATABASE_VERSION = 8; | |||
private static final int DATABASE_VERSION = 9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Database version is already updated here b596202
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saketkumar95 we need to update the database version whenever we make changes to the existing database model so that the existing tables are dropped and new tables with updated schema are created.
android:paddingBottom="16dp" | ||
android:paddingLeft="16dp" | ||
android:paddingRight="16dp" | ||
android:paddingTop="16dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if you put this all in dimens.xml. :)
@Sam1301 Really nice work! :) Resolve the merge conflicts too. 👍 |
Summary of changes
shows unread counts
bankruptcy menu option
fetch 1000 messages on start-up (related discussion Fix null streams #283 (comment))