forked from nonlin-lin-chaos-order-etc-etal/tdlib
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitOrigin-RevId: ce481612a17e38268b8b2c3a9d7b9ebad5cb572d
- Loading branch information
Showing
7 changed files
with
55 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// Copyright Aliaksei Levin ([email protected]), Arseny Smirnov ([email protected]) 2014-2020 | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
// | ||
#pragma once | ||
|
||
#include "td/telegram/td_api.h" | ||
|
||
#include "td/utils/common.h" | ||
|
||
namespace td { | ||
|
||
enum class TopDialogCategory : int32 { | ||
Correspondent, | ||
BotPM, | ||
BotInline, | ||
Group, | ||
Channel, | ||
Call, | ||
ForwardUsers, | ||
ForwardChats, | ||
Size | ||
}; | ||
|
||
inline TopDialogCategory top_dialog_category_from_td_api(const td_api::TopChatCategory &category) { | ||
switch (category.get_id()) { | ||
case td_api::topChatCategoryUsers::ID: | ||
return TopDialogCategory::Correspondent; | ||
case td_api::topChatCategoryBots::ID: | ||
return TopDialogCategory::BotPM; | ||
case td_api::topChatCategoryInlineBots::ID: | ||
return TopDialogCategory::BotInline; | ||
case td_api::topChatCategoryGroups::ID: | ||
return TopDialogCategory::Group; | ||
case td_api::topChatCategoryChannels::ID: | ||
return TopDialogCategory::Channel; | ||
case td_api::topChatCategoryCalls::ID: | ||
return TopDialogCategory::Call; | ||
case td_api::topChatCategoryForwardChats::ID: | ||
return TopDialogCategory::ForwardUsers; | ||
default: | ||
UNREACHABLE(); | ||
} | ||
} | ||
|
||
} // namespace td |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters