element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

[Feature Request] Store logs offline #1184

Open contrapunctus-1 opened 7 years ago

contrapunctus-1 commented 7 years ago

Thank you for a very sleek and modern IM experience, and particularly for bringing it to IRC via the IRC bridge.

  1. Some way to store logs offline in a plain text format would be very useful, so one may make backups of them, among other things. A way to disable it, and to set the storage location to the SD card would also be nice, for those concerned with space usage and writes to the internal storage.
  2. Furthermore, it seems as though Riot currently does not store logs on the device at all. This is wasteful on slow or patchy connections. Even with a faster connection, there is still lag loading the backlog, which discourages looking through the history. And in either case one is dependent on a connection for acquiring data one has already downloaded. I daresay this causes needless additional load on the server, too.
ylecollen commented 7 years ago

1- nice idea 2- The chat histories are stored on the device except if there are more than about 10 missing messages since the last sync (ie you put the application in background). In this case, the room history is deleted.

contrapunctus-1 commented 7 years ago

Thank you for your response!

The chat histories are stored on the device except if there are more than about 10 missing messages since the last sync (ie you put the application in background). In this case, the room history is deleted.

Is there a reason for this behaviour? It'd be nicer if the messages were fetched once and only once - to be able to access the history through the client at any time, and more responsively than now.

ara4n commented 7 years ago

If we synced full logs to the client, you could end up in the situation of waking up in the morning and having to wait for the client to download megabytes of random content from busy rooms you're lurking in, which chews disk space and bandwidth and would block the app from being usable for other stuff.

However, we could certainly have this as an option in future for folks who want a full local replica (particularly useful for hypothetical clientside search of e2e content)

-- Matthew Hodgson Matrix.org

On 7 May 2017, at 16:13, contrapunctus-1 notifications@github.com wrote:

Thank you for your response!

The chat histories are stored on the device except if there are more than about 10 missing messages since the last sync (ie you put the application in background). In this case, the room history is deleted.

Is there a reason for this behaviour? It'd be nicer if the messages were fetched once and only once - to be able to access the history through the client at any time, and more responsively than now.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

krombel commented 7 years ago

I would prefer to download the history in the morning at home (Wifi) than on the go which consumes mobile data. I do not want "a full local replica" but if possible I would like to have the messages from the latest read message. As there will be a read mark (just in dev-branch of synapse right now) we could use this (plus a few for context) or a (configurable) time (e.g. 24 hours)

ghost commented 7 years ago

I suppose that in order to support this properly, the client needs to allow "gaps" to exist in stored room history. Scrolling over the gaps should fill in the history from the server, while the messages already in store would not need to be downloaded again.

Some alternative method for expiring old messages would need to be implemented.

The current behaviour is annoying. If I am scrolled up in a room, and turn off the phone for a while to do something else, and then come back to it, chances are good that I'll get one last look, after which it syncs and erases history, and I find myself back at the bottom of the timeline. I then have to tediously scroll back up again, redownloading the messages as I go.

witchent commented 6 years ago

Just wanted to ask if there are still plans on doing this local replica? I want to use riot as my main communicating app, but as I only got 100mb mobile data per month it's not really feasible right now. The local search would be pretty good for my encrypted rooms, too.

Swader commented 5 years ago

Any movement here? Should we open a Gitcoin bounty for an implementation of this? Has it been discussed further anywhere I could take a look?

bmarty commented 5 years ago

Hello, Yes, it's a shame to delete data that has been already been downloaded. We will improve this in the future, when the data will not be serialized in local files anymore. Benoît