Minimize to tray

Is your feature request related to a problem?
A lot of people like me have the habit of closing a window after using it, which means every time we would want to use it, we’d have to for AnyType to boot up again.

Describe the solution you’d like
An option to close to tray instead of fully closing the app when clicking the X button, and an option to remember it.

Give us a real world use case for this feature
Doesn’t have to keep a window minimized, but doesn’t have to close and wait for the long boot time either.

Describe alternatives you’ve considered
KDocker, but it’s not as clean since AnyType already has a tray icon.

Additional context
N/A

1 Like

Check this:

Hello! I have seen this post already. But it doesnt seem to be resolved, neither does it seem to be planned, did I miss something?
If the idea was to just minimize it, minimizing behaves quite differently than closing to tray, since one never gets rendered unless called, and one sometimes gets rendered when switching between windows. I would call it one layer more lazy if you get what I mean, it’s even less involved in the normal usage, like if it’s used instead of when it’s used.

Edit: I went back to reread it, and only just noticed that it already closes to tray on Windows. Though I’m still confused since that would mean it’s a unintended behaviour right? why is there no marking of it being fix-in-progress?

It seems to be an intended behavior on Windows, it just seems not to be implemented on Linux for some reason. No idea how it works on Mac. Ideally, they should add an option in the settings to modify the behaviour.

there is just a line of code that says to exit the app when all windows are closed, I will comment it and you will check in next release this behavior.

4 Likes

Hello! In this release, it seems to behave a little better, but it’s still not working :frowning:

It would seem like when I press x on the application, it closes to tray correctly(i.e. application disappears but tray icon persists). But after a short time, the tray icon disappears, almost as if it got killed, could it be because one of the colleges uncommented said line?

2 Likes

When I look at the logs by launching the application from console, this is the log that it printed:

// I close the app
13:52:04.736 › closeMain: undefined
closeMain: undefined
13:52:04.739 › [Api].exit, relaunch: false
[Api].exit, relaunch: false
{"level":"error","ts":"2022-09-01T13:52:04.739+0800","logger":"anytype-mw-api","caller":"core/grpc_events.go:34","msg":"stream eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWVkIjoiR2NPakJpU3EifQ.iPEt1KY0f51qLYJ-gGfQ_SjEFZSBiKaXF7Uhs2OJW1E interrupted"}

//After a bit (tray icon disappears now)

stopping the library...
library has been successfully stopped

{"level":"error","ts":"2022-09-01T13:52:05.464+0800","logger":"net","caller":"net/net.go:1629","msg":"exchangeEdges with 12D3KooWKwPC165PptjnzYzGrEs7NSjsF5vvMmxmuqpA2VfaBbLw failed: rpc error: code = Canceled desc = context canceled"}

{"level":"error","ts":"2022-09-01T13:52:05.648+0800","logger":"net","caller":"net/client.go:638","msg":"error closing connection: rpc error: code = Canceled desc = grpc: the client connection is closing","peer":"12D3KooWBtoBwxCycUVzwTMiLHJog4V87Qp7XhTcCay3k1XwJe6X"}
{"level":"error","ts":"2022-09-01T13:52:05.648+0800","logger":"net","caller":"net/net.go:1629","msg":"exchangeEdges with 12D3KooWBtoBwxCycUVzwTMiLHJog4V87Qp7XhTcCay3k1XwJe6X failed: rpc error: code = Canceled desc = context canceled"}

13:52:05.748 › [Api].shutdown, relaunch: false
[Api].shutdown, relaunch: false

1 Like

@Ciel that seems like it’s a separate bug. On Windows, the app remains minimized to the tray when I clicked the X to close the (last) window. Could you create a separate but report for that?

Edit: I’m reopening this FR because a key part has not yet been implemented: adding an option in the settings to allow the user to choose the behavior of closing to systray or completely shutting down the app.

Fixed for Linux (finally).

1 Like

As there were different opinions about the behaviour when clicking the X. Now it’s set to X → minimize, instead of close?

Yes, now it’s minimising

1 Like

As in in the development build I’m guessing? Since I just checked for update, and pressing x still closes AnyType.

I guess a separate feature request should be made to get an option to configure that?

I’m just answering that it’s fixed for moderators and users to be aware that the fix is planned in next release, yes.

1 Like

Does that also mean we can configure the behavior in the settings? :innocent:

Tested this feature on Fedora 36 using Anytype appimage v0.29.1.

For me clicking X completely closes the app instead of minimizing to tray.

This seems to be fixed for me on Linux (popOS). Does it work on other platforms?

Yep, as a developer mentioned before, it is working as expected now in the latest release.