do_update_pointer: Improve docs for old mobile app code path.

This commit is contained in:
Tim Abbott 2018-08-10 13:17:55 -07:00
parent 8ba726d47d
commit cc5c8fc022
1 changed files with 6 additions and 4 deletions

View File

@ -3543,10 +3543,12 @@ def do_update_pointer(user_profile: UserProfile, client: Client,
user_profile.pointer = pointer user_profile.pointer = pointer
user_profile.save(update_fields=["pointer"]) user_profile.save(update_fields=["pointer"])
if update_flags: if update_flags: # nocoverage
# Until we handle the new read counts in the Android app # This block of code is compatibility code for the
# natively, this is a shim that will mark as read any messages # legacy/original Zulip Android app natively. It's a shim
# up until the pointer move # that will mark as read any messages up until the pointer
# move; we expect to remove this feature entirely before long,
# when we drop support for the old Android app entirely.
UserMessage.objects.filter(user_profile=user_profile, UserMessage.objects.filter(user_profile=user_profile,
message__id__gt=prev_pointer, message__id__gt=prev_pointer,
message__id__lte=pointer).extra( message__id__lte=pointer).extra(