| 2198 | } |
| 2199 | |
| 2200 | void SessionController::closeForum() { |
| 2201 | if (const auto forum = _shownForum.current()) { |
| 2202 | const auto id = windowId(); |
| 2203 | if (id.type == SeparateType::Forum) { |
| 2204 | const auto initial = id.forum(); |
| 2205 | if (!initial || initial == forum) { |
| 2206 | Core::App().closeWindow(_window); |
| 2207 | } else { |
| 2208 | showForum(initial); |
| 2209 | } |
| 2210 | return; |
| 2211 | } |
| 2212 | } |
| 2213 | _shownForumLifetime.destroy(); |
| 2214 | _shownForum = nullptr; |
| 2215 | } |
| 2216 | |
| 2217 | void SessionController::setupPremiumToast() { |
| 2218 | rpl::combine( |
no test coverage detected