Today, for the first time in a long while, I'm able to carve out a whole day to work on #Macstodon . So like I did a few weeks back, this is going to be a "live" thread of my attempt to get bookmarks, boosts, and favourites implemented. Maybe replies too, if there's time. Maybe other things if it goes really well and there's lots of time.

#RetroProgramming

First of all, I just fixed the bug that allowed you to have multiple toots selected at once, across different timelines. That's kind of an important one because we need to know _which_ toot is selected in order to interact with it!

I _almost_ have bookmarks working. I wrote a helper function to find the selected toot and timeline that it belongs to, extract the ID, figure out if it's already been bookmarked or not, and make the appropriate API call.

For some reason the HTTP request is failing though, and I'm getting a generic "malformed URL" error, even though the URL is definitely correct, and other requests seem to work just fine. πŸ˜•β€‹

OK, fixed it! I wasn't handling the case properly when POSTing to a URL with an empty post body. But it works, and now I can successfully bookmark a toot from within Macstodon πŸ˜β€‹

Unbookmarking doesn't work though - and I think I know why, it's because the previous state of the toot is cached in the timeline. So we don't know that the toot has _already_ been bookmarked, and that we need to unbookmark it instead. Shouldn't be too hard of a fix though.

why is caching so hard ugh
There we go, both bookmarking and unbookmarking work now! Fortunately I should be able to just copy/paste this code to make it work for boosts and favourites as well πŸ˜„

Bookmark/unbookmark, favourite/unfavourite, and boosting works now.

But _unboosting_ seems to silently fail for some reason. Not entirely sure why that is yet.

Fixed unboosting. Turns out, when you boost a toot, the API returns the _boosted_ toot, not the original (which makes sense). But you need to look at the _original_ toot to see if you've boosted it or not, and I was overwriting the timeline with the boosted toot.

One thing I want to do before tackling replies: displaying the current boost/favourite counts. That should be pretty easy, right?

Implemented reply, boost, and favourite counts. This required a small UI tweak but I think it turned out pretty good!

Next on the agenda today is implementing support for replies.

Replies are working!

Alright, that's a good place to call it for today, I think. I'm getting hungry now πŸ˜…β€‹

There are two more things I want to get done before releasing 0.4:
- Implement toot privacy settings and CWs
- Add a splash screen so y'all have something nice to look at while the app loads

Then there's the usual release prep, update the readme, screenshots, etc. But I think we could have a 0.4 release in a couple of days!

Thanks everyone who commented, favourited, boosted, etc, on the thread today, especially everyone that is new! I'll go look through all your profiles after dinner πŸ˜β€‹

#Macstodon #RetroProgramming

@smallsco This is sweeeet, and it looks so *real* like a serious bit of software that I once used
@smallsco oh shoot, that's wicked! πŸ‘
@smallsco I am curious what hardware you’re using with this. :)
@jrn I'm mostly developing on a Mac IIfx running System 7.1 (but occasionally I work with the BasiliskII emulator on my MacBook Pro)
@smallsco I love this project. Also, I miss ResEdit.
@smallsco oh my god i need to try this on my os 9 machine
i mean on that i could probably get classilla to work using a minimal webui but like its not macintosh toolbox enough
@smallsco ah read the readme on github
still wanna see if it runs in the 68k emulator although i could try a different macpython
still incredibly cool tho

@kass9 Once I've "completed" Macstodon I might try building it with a later version of MacPython (which is PPC only) and see if it fixes the bugs I ran into. In theory that should also allow for unicode support and a much faster JSON parser. And then release that as a "Deluxe" version or something.

If you want to give it a try now you can grab MacPython 1.5.2 and run the BuildApplication compiler, selecting the "PPC" or "FAT" option. It will work, but the UI will bug out, the console will be stuck on and you'll get a doubled menu bar...and it will hang on uncaught exceptions. Not a great user experience.

@smallsco ah rip
ill probably just use classilla for my classic mac mastodon needs(?) for now then
maybe when i finally get a color 68k mac ill try this out

@kass9 Macstodon won't run on Mac OS 9 - it's a 68K only app, which runs on System 7.1 through 8.1.

(The version of MacPython I'm using _can_ build for PowerPC, but I disabled it since it wouldn't respect the runtime settings I had configured on that platform, and I'm not sure how to fix it)

You can run it using the BasiliskII emulator, though!

@smallsco hmm 7.1
i might be able to force it to run on my 7.5 mac classic
but i dont have a way to get that online so i might just try to force it to use os 9
@kass9 I can confirm that it works just fine on 7.5, but yeah, you need an internet connection.

@smallsco As a fellow software eng.

Famous.
Last.
Words.

@alice That's how it always is πŸ˜‚β€‹ The stuff that I think is going to be hard gets done without much hiccups, and the "easy" stuff has me banging my head against the wall for hours.