summaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
authorJoe Robinson <joe@grabyo.com>2017-04-20 17:02:28 +0100
committerJoe Robinson <joe@grabyo.com>2017-04-20 17:02:28 +0100
commit04a26f18dd9841c07aeb0fbbb1b30e71308ba068 (patch)
treeaf74cea19af4cff73bb48a790a003584d8557bfe /main.qml
parent4e172068e8e817d80d2e9575289feb8a4314be49 (diff)
Add ability to /part channels
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/main.qml b/main.qml
index a4714a8..592e9f0 100644
--- a/main.qml
+++ b/main.qml
@@ -42,5 +42,18 @@ ApplicationWindow {
}
}
}
+
+ function remove_channel(channel) {
+ for (var i = 0; i < channel_tabs.count; ++i) {
+ if (channel_tabs.itemAt(i).text === channel) {
+ channel_tabs.removeItem(i)
+ }
+ }
+ for (var i = 0; i < swipeView.children.length; ++i) {
+ if (swipeView.children[i].objectName === "channel-"+channel) {
+ swipeView.children[i].destroy()
+ }
+ }
+ }
}
}