forked from clan/clan-core
Clan VM Manager: detect if clan exists
This commit is contained in:
parent
045c5e608b
commit
030cbd24ce
@ -116,10 +116,8 @@ class ClanURI:
|
||||
def get_full_uri(self) -> str:
|
||||
return self._full_uri
|
||||
|
||||
# TODO(@Qubasa): return a comparable id e.g. f"{url}#{attr}"
|
||||
# This should be our standard.
|
||||
def get_id(self) -> str:
|
||||
return f"{self._components.path}#{self._components.fragment}"
|
||||
return f"{self.get_internal()}#{self.params.flake_attr}"
|
||||
|
||||
@classmethod
|
||||
def from_path(
|
||||
|
@ -188,7 +188,8 @@ class ClanList(Gtk.Box):
|
||||
row.add_css_class("trust")
|
||||
|
||||
# TODO: figure out how to detect that
|
||||
if True:
|
||||
exist = VMS.use().get_by_id(item.url.get_id())
|
||||
if exist:
|
||||
row.set_subtitle("Clan already exists. Joining again will update it")
|
||||
|
||||
avatar = Adw.Avatar()
|
||||
|
Loading…
Reference in New Issue
Block a user