mirror of
https://github.com/ihabunek/toot
synced 2024-12-25 00:20:55 +01:00
Fix version detection
Version check failed when the server sent something other than a number as a version as happened on development version of the gotosocial server.
This commit is contained in:
parent
0a6543d355
commit
4f9391f015
@ -336,7 +336,8 @@ class TUI(urwid.Frame):
|
||||
# this works for Mastodon and Pleroma version strings
|
||||
# Mastodon versions < 4 do not have translation service
|
||||
# Revisit this logic if Pleroma implements translation
|
||||
self.can_translate = int(instance["version"][0]) > 3
|
||||
ch = instance["version"][0]
|
||||
self.can_translate = int(ch) > 3 if ch.isnumeric() else False
|
||||
|
||||
return self.run_in_thread(_load_instance, done_callback=_done)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user