Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

[Bug] "Sort by activity" not working on iOS

Open NicoHaase opened this issue 5 years ago • 21 comments

Description:

I've configured my RocketChat clients to sort the channel / user list by activity. In the apps on Ubuntu and MacOS, this works pretty fine (such that the channels and users with most recent activity are listed on top), but on iOS, this does not work: some channels with recent activity are shown where they should be shown, but some are listed at positions I do not understand. For example: one of the channels with most recent activity two days ago is listed where I would expect it to be listed in the MacOS app (the channel listed above had its last activity after that channel, the next in list was active a bit earlier).

That same channel is listed way off in the iOS app: below a user I had the last contact on Dec 06 2019.

Additional information:

  • I already tried to resolve this error by clearing my app's local cache (on the iPhone), but that does change anything
  • This does not happen for all channels, but only some (I see no connection between them)
  • This is not resolved by writing something to that channel on my own

Environment Information:

  • Rocket.Chat Server Version: 3.7.1 (running in a Docker container, using MongoDB 3.4.24)
  • Rocket.Chat App Version: 4.12.1.317
  • Device Name: iPhone 12 Mini
  • OS Version: 14.2.1

NicoHaase avatar Dec 06 '20 11:12 NicoHaase

On MacOS On iPhone
screenshot macos 0C58A46D-27E4-4C9E-8D6E-392F52AA1E0C_1_105_c

All of the channels listed had activity with the last week, the first conversation with a coworker holds its last message today, the channel listed at the bottom of the screenshot on Friday (two days ago). All of the last messages are "ordinary" messages, none of them are answers within threads

NicoHaase avatar Dec 06 '20 11:12 NicoHaase

Hey @NicoHaase do you know if it can be related to messages inside threads? Check if the latest message on channels that are on wrong position are inside threads. If yes, it was fixed by #2688. Thanks in advance.

djorkaeffalexandre avatar Dec 06 '20 11:12 djorkaeffalexandre

Hu @djorkaeffalexandre, thanks for your quick answer! Can you explain further what that fix is about?

To clarify my problem: I've attached two screenshots, and as you can see, the channel starting with "#koe" is missing on iPhone. That's a channel with pretty high activity (nearly daily), and on the iPhone, it's listed below a user I last wrote with a year ago. I would assume that in the last year, there has been activity of all kinds (new messages, threads, answers in threads, users joining and leaving) that must have triggered this message to bubble up in the list

NicoHaase avatar Dec 06 '20 11:12 NicoHaase

@NicoHaase this fix was about some channels that doesn't goes to the right position on chats order when they have a new message inside a thread. With the fix we're checking for the max date between the lastMessage.timestamp and the roomUpdatedAt, what is generating the same order of the web client. You can try these steps:

How to test or reproduce

* Sort by activity
* Send a message on a thread to a older chat (without sending it to the main channel)
* App should send it to the top of RoomsListView

If this is the error that you're talking about, so, it will be fixed on the next app version. Thanks.

djorkaeffalexandre avatar Dec 06 '20 11:12 djorkaeffalexandre

I don't think that this is the same problem - I've scanned through that channel in question, and I've found numerous answers in threads within the last two months, and numerous "ordinary" new messages (being not part of a thread, or a cited answer of another message). So, if the problem you have fixed is the same as mine, I would have expected this channel to be sorted somewhere between the other channels with activity within the last two months. But it's not, it's listed after a conversation that is about a year old.

I'll add some more information to my answer containing the screenshots, to keep this information together. If there is any way to debug this problem further, I'd be happy to provide help. Within our self-hosted RC instance, I can check for more details if there is some kind of "debugging window" :)

NicoHaase avatar Dec 06 '20 12:12 NicoHaase

Hey, @NicoHaase. Thanks for opening this issue. We're going to release a beta next week containing the fix @djorkaeffalexandre mentioned. If you happen to narrow it down and find a reproducible case this week, let us know and we'll try to fix it and release on the same beta. Otherwise, let's test it on beta and check if it's fixed.

diegolmello avatar Dec 07 '20 12:12 diegolmello

The problem still active - in the mobile application does not coincide with the web, and it is also not correct - my messages are displayed as before, in a chaotic manner.

C1ean avatar Dec 18 '20 21:12 C1ean

@C1ean What app version are you running?

diegolmello avatar Dec 21 '20 12:12 diegolmello

@djorkaeffalexandre @diegolmello today, my iPhone received an update to v4.13.0, and the order is now consistent - thanks for your great work!

NicoHaase avatar Dec 21 '20 12:12 NicoHaase

@C1ean What app version are you running?

4.13.0.22082 server 3.5.1

I can attach video from my phone.. sorting began to very strangely, and conditionally the oldest messages began to appear with the current time in the history of messages ... which is not reproduced in the web version ..

C1ean avatar Dec 21 '20 21:12 C1ean

To add one more case that is now handled differently in the mobile app, compared to the others: a colleague left a channel (this channel has not seen any other activity since April 2020!), and this trigged the activity flag in the mobile app. Now, this channel is listed amongst other channels that received new messages in the last days.

In the web app and in the native Ubuntu app, this channel is listed further down in the list, between other channels and conversations that were last active in spring 2020

NicoHaase avatar Dec 22 '20 11:12 NicoHaase

Screenshost from my iPhone SE iOS: 14.1 93B0F004-B07C-4F8C-8E39-E022C0E19B00

App and server version: A5336B31-BBF1-45C3-A550-7A33ECB5903B

michaltrmac avatar Jan 18 '21 18:01 michaltrmac

@michaltrmac you have an updated room with 08/13/2020, so the date format is MM/DD/YYYY and the order sorting by desc activity is correct.

diegolmello avatar Jan 18 '21 19:01 diegolmello

@diegolmello So I probably misunderstand the sort by activity option. In previous versions, any channel activity, including a new message, was taken as a change. Now the new message does not update the activity of the channel.

michaltrmac avatar Jan 18 '21 23:01 michaltrmac

@michaltrmac Ok, maybe that's because you're using a really old version of the server.

diegolmello avatar Jan 19 '21 12:01 diegolmello

Is this issue still open and can @diegolmello tell me what is the exact requirement in this issue?

adityarajsinghvi avatar Jan 19 '21 17:01 adityarajsinghvi

I made a huge mistake and upgraded iOS app of Rocket Chat. Now you guys show activity in channel in the list of channels so subtle that is almost not possible to distinguish if someone written to the channel so it is totally meaningless and in principle you could just skip showing if channel has some activity, and now sorting by last activity does not work, meaning app is not useable now. Come on!

First let someone with UI/UX skills fix your designs! Actually I can suggest that instead of subtle/not visible/not distinguishable/meaningless bolding of the channel name that has some activity (i.e. has unread messages) please make a huge difference in the visibilty of such channel name on the list, like background color change, channel name color change, blinking or whatever else that is anyway going to be way much better than this nothing.

Then please fix bug with sorting channels by activity meaning if someone wrote on the channel and I had not read it then show it first on top of the list so I do not have to scroll 120 channels to check if someone wrote somewhere.

Just a side note for me, never ever again update Rocket Chat app when it works, as my experience so far with upgrades is that always something gets broken, I am logged out from the server, some graphical glitch is so annoying etc. I wish I had a possibility to downgrade this version.

Thanks in advance!

slajerek avatar Jan 28 '21 15:01 slajerek

Hey, @slajerek. Are you willing to contribute back to the community? Thank you.

diegolmello avatar Jan 28 '21 17:01 diegolmello

Sure I do! Can with my friend create a theme that will go into official builds? I understand the problem with sorting, that's OK and such error happens, but backup i.e. proper UI can be fixed easily! I will try to compile the sources... thanks!

slajerek avatar Jan 28 '21 19:01 slajerek

I'm afraid themes are responsibility of our design team.

I was talking about the sorting issue. I think these two (https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/2688 and https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/2763) might have created a bug on sorting for older servers while fixed sorting for the newer ones.

diegolmello avatar Jan 28 '21 19:01 diegolmello