mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
parent
73c146c65a
commit
f62cf772a7
@ -128,25 +128,23 @@ _bookmark_remove(const char *jid, gboolean autojoin)
|
|||||||
_bookmark_item_destroy(item);
|
_bookmark_item_destroy(item);
|
||||||
gboolean removed = found != NULL;
|
gboolean removed = found != NULL;
|
||||||
|
|
||||||
|
if (removed) {
|
||||||
// set autojoin FALSE
|
// set autojoin FALSE
|
||||||
if (autojoin) {
|
if (autojoin) {
|
||||||
if (found != NULL) {
|
|
||||||
Bookmark *bookmark = found->data;
|
Bookmark *bookmark = found->data;
|
||||||
bookmark->autojoin = FALSE;
|
bookmark->autojoin = FALSE;
|
||||||
g_list_free(found);
|
g_list_free(found);
|
||||||
}
|
|
||||||
|
|
||||||
// remove bookmark
|
// remove bookmark
|
||||||
} else {
|
} else {
|
||||||
if (found != NULL) {
|
|
||||||
bookmark_list = g_list_remove_link(bookmark_list, found);
|
bookmark_list = g_list_remove_link(bookmark_list, found);
|
||||||
_bookmark_item_destroy(found->data);
|
_bookmark_item_destroy(found->data);
|
||||||
g_list_free(found);
|
g_list_free(found);
|
||||||
}
|
|
||||||
autocomplete_remove(bookmark_ac, jid);
|
autocomplete_remove(bookmark_ac, jid);
|
||||||
}
|
}
|
||||||
|
|
||||||
_send_bookmarks();
|
_send_bookmarks();
|
||||||
|
}
|
||||||
|
|
||||||
return removed;
|
return removed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user