Firstbober / krita-rpc

Discord Rich Presence extension for Krita
GNU General Public License v3.0
89 stars 5 forks source link

Document creation doesn't lead to change of RPC information #5

Closed HeroBrine1st closed 3 years ago

HeroBrine1st commented 3 years ago

Fixed:

This PR should not produce any (new) bugs because this is just change of default field value. I tested it by one or two minutes just in case.

HeroBrine1st commented 3 years ago

It worth saying that it not always will be "Unnamed". For example, on my machine with russian language as system language it's "Безымянный", notwithstanding it's "Unnamed" in code (I checked it twice) изображение I don't know why this bug was on my machine before this fix, because in that case name is not empty string anymore and condition should become true, so I think (and hope!) it's an internal translation or something.

HeroBrine1st commented 3 years ago

False alarm, I understood. In this line code checks that fileName has changed, then in this line code obtains a name that has default value and in my language it's "Безымянный".

if self.file != Krita.instance().activeDocument().fileName():  # Check file name
    RPC.update(details="Drawing something cool",
        state=str(Krita.instance().activeDocument().name()) or "Unnamed",  # Get just the name and display to users
        large_image="krita_logo", start=int(self.time))

So it's not a bug - it's a feature 🙃

Firstbober commented 3 years ago

Thanks for keeping this constantly working! Merging.