| 295 | } |
| 296 | |
| 297 | void Forum::saveActiveSubsectionThread(not_null<Thread*> thread) { |
| 298 | if (const auto topic = thread->asTopic()) { |
| 299 | Assert(topic->forum() == this); |
| 300 | _activeSubsectionTopic = topic->creating() ? nullptr : topic; |
| 301 | } else { |
| 302 | Assert(thread == history()); |
| 303 | _activeSubsectionTopic = nullptr; |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | Thread *Forum::activeSubsectionThread() const { |
| 308 | return _activeSubsectionTopic; |
no test coverage detected