From 04a26f18dd9841c07aeb0fbbb1b30e71308ba068 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Thu, 20 Apr 2017 17:02:28 +0100 Subject: Add ability to /part channels --- main.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'main.qml') 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() + } + } + } } } -- cgit v1.2.3