Tusky icon indicating copy to clipboard operation
Tusky copied to clipboard

Offline Usage

Open wbrawner opened this issue 6 years ago • 10 comments

It would be nice if the app stored a certain amount (the past 7 days or 1000, maybe configurable?) of toots offline, and maybe periodically updated the database in the background so that when you open the app, you immediately have content to look at. So instead of going from app -> server, you would check app -> local (SQLite) database -> server, and once the database gets an update, it can prompt the user to refresh to see the newest toots. I'm fairly certain this is what most major social media apps do (Facebook, Twitter, etc). If help is needed on this, I'd be happy to contribute.


  • Tusky Version: 3.1

  • Android Version: 8.1

  • Android Device: Note 8

  • Mastodon instance (if applicable): brawner.social

  • [x] I searched and browsed the repo’s other issues to ensure this is not a duplicate.

wbrawner avatar Oct 25 '18 19:10 wbrawner

Hi! That's a good idea of course and that"s what I'm trying ti implement for the last half a year :sweat_smile: See #809

charlag avatar Oct 26 '18 17:10 charlag

Hi! I saw that after I had already submitted the issue. In the future I'll search issues and open PRs prior to opening a new issue 😅I'll follow up on the PR. Thanks!

wbrawner avatar Oct 26 '18 21:10 wbrawner

No problem, we didn't have an issue exactly about this. Now we do!

charlag avatar Oct 27 '18 17:10 charlag

One thing that would probably help would be to fetch timeline updates when notifications get checked. This would especially be useful if you're like me and find yourself randomly offline because you're in Oklahoma which has a lot of buildings made apparently of Farraday cages or just plain rural beyond any phone company's ability to care about. My holy grail on this would be:

  • The ability to read the timelines up to some configurable distance back, including media.
  • Post anytime, anywhere and have 'em go out next time there's a connection.
  • Interact with existing posts (favorite/reply/boost) and update own profile and have changes go out next time there's a connection.

Think like how you can do everything asynchronously in your typical XMPP or email app. It doesn't care if you're on or offline at any given time, it just shows you what it's got, and synchronizes it all out in the background when it's possible without bothering you with the gory details unless something really goes wrong.

Some use case scenarios I've encountered where I might want to take a look at things and not worry about having a connection:

  • Basement of a large facility where cellphone signals don't penetrate and wifi is iffy at best thanks to hallways going under streets (so like, seriously underground), other buildings, etc.
  • At a rural food stop in the middle of nowhere, a chance to catch up while I'm eating. No cell signal, no wifi. But I've been on the road 8+ hours and had a connection 3 hours ago, that should get me to three hours ago, right?
  • I'm at an outdoor furry convention at a state resort. There's just no signal. But, I'm still taking photos and having thoughts I might want to share in the moment without having to sift through it all for hours and post it later. Instead, all that backlog just goes out at some point I get back on the grid without further interaction while I'm driving home.

BalooUriza avatar Apr 06 '19 19:04 BalooUriza

Thanks for the writeup. I agree with pretty much all of it and I believe that it perhaps should be the end goal. I don't like stressing server and bandwidth by downloading all media though so there are some difficulties. There can also be some conflicts between local and remote versions and it all should be taken into account, I don't know when anf if it'll come.

charlag avatar Apr 06 '19 19:04 charlag

I don't like stressing server and bandwidth by downloading all media though so there are some difficulties.

Off by default but giving the option to include media would help. AndStatus has this on by default and lacks CW parsing, so that's not suitable for me.

There can also be some conflicts between local and remote versions and it all should be taken into account, I don't know when anf if it'll come.

Even "server is always canonical" would be an improvement over nothing, if it's documented as such someplace obvious. Like if you're performing an action where the server might conflict destructively, a banner that says "You are offline. In case of a conflict, the server's version will override your change." OpenStreetMap editors tend to do this by default (JOSM's the only one that doesn't, and hoo boy, conflict resolution is a good reason why most editors warn that a newer version on the server always wins instead of dealing with that).

BalooUriza avatar Apr 06 '19 23:04 BalooUriza

Feeder(RSS reader) is an example that has this. Also has an option about the charging state and if it has wifi.

o-jasper avatar Mar 30 '22 10:03 o-jasper

Adding myself to that; this is one of the core features that still lets me get back to using AndStatus as a secondary AP client. They way they implemented it seems pretty robust and close to how I'd like things to be (still missing something of a mail-client'ish AP frontend), but their user interface has room for improvements, so having something like this in Tusky would be perfect. :)

kr428 avatar May 10 '22 06:05 kr428

There's no good way to have real offline with current api (can only get latest 400 posts and we don't know what happened to the older posts)

charlag avatar May 10 '22 14:05 charlag

Maybe there's something to replicate from how AndStatus does that? For what I see, it is basically pulling everything it can get at a certain point in time and keeping it until you decide not to have it anymore. That wouldn't allow for getting older post and/or removing post that have been removed on the server, but at least it would provide rudimentary support of keeping data "available". Same way, for sending posts, maybe "simply"(?) the current drafts feature could be qualified to keep posts there if no network is available and send them out once this changes?

kr428 avatar May 18 '22 08:05 kr428

I'd like to boost the idea of being able to write offline drafts to post later, as mentioned above. The present draft functionally (Feb 2023) partly serves this purpose, but it critically misses the ability to attach photos to the draft text to send out later.

My intended use case is for backpacking trips, where I'll be in Airplane Mode for 3-4 days, writing up short posts with the pictures I'm taking. It's useful to attach the pictures while I'm still out there, and to not have to figure out which pictures go with which posts when I get back to town.

vaschw avatar Feb 24 '23 02:02 vaschw