From 63db16a711fa1f4127b11197940d47032867ec94 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 2 May 2022 02:31:15 -0400 Subject: open channel if its the first opened tab --- src/components/channeltabswitcherhandy.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/components/channeltabswitcherhandy.cpp') diff --git a/src/components/channeltabswitcherhandy.cpp b/src/components/channeltabswitcherhandy.cpp index 9abceed..609d17c 100644 --- a/src/components/channeltabswitcherhandy.cpp +++ b/src/components/channeltabswitcherhandy.cpp @@ -113,6 +113,10 @@ void ChannelTabSwitcherHandy::GoForwardOnCurrent() { AdvanceOnCurrent(1); } +int ChannelTabSwitcherHandy::GetNumberOfTabs() const { + return hdy_tab_view_get_n_pages(m_tab_view); +} + void ChannelTabSwitcherHandy::CheckUnread(Snowflake id) { if (auto it = m_pages.find(id); it != m_pages.end()) { hdy_tab_page_set_needs_attention(it->second, Abaddon::Get().GetDiscordClient().GetUnreadStateForChannel(id) > -1); -- cgit v1.2.3