基于Telegram二次開發(fā) --- App次級(jí)頁(yè)面邏輯

分析版本:Telegram 8.7.1

Telegram App.png

一、 聯(lián)系人模塊:ContactsController

image.png
  • DeviceContactInfoController: 導(dǎo)航欄 Navigation 右上角按鈕,調(diào)用系統(tǒng)的創(chuàng)建聯(lián)系人。
  • PeersNearbyController: cell Find People Nearby 的響應(yīng)界面,它的cell Create a Local Group 則是跳轉(zhuǎn)到 PermissionController 中間頁(yè),進(jìn)入創(chuàng)建當(dāng)前位置群聊的業(yè)務(wù)邏輯。
  • InviteContactsController: cell Invite Friends 的響應(yīng)界面,邀請(qǐng)業(yè)務(wù)相關(guān)。

二、消息列表模塊:ChatListController

image.png
  • ComposeControllerl: 導(dǎo)航欄 Navigation 右上角按鈕響應(yīng)控制器,功能為創(chuàng)建新的消息;其頁(yè)面有三個(gè) cell 響應(yīng)事件。
    New Group: 對(duì)應(yīng)控制器 ContactMultiselectionController
    New Contact: 對(duì)應(yīng)控制器 DeviceContactInfoController ,創(chuàng)建聯(lián)系人公用控制器。
    New Channel: 對(duì)應(yīng)控制器 PermissionController ,中間頁(yè)公用展示控制器,進(jìn)入創(chuàng)建 Channel 業(yè)務(wù)邏輯。
  • ChatController: 消息列表被點(diǎn)擊,進(jìn)入聊天消息頁(yè)面,核心控制器,里面16000行代碼,各種邏輯嵌套,高度耦合,極難閱讀區(qū)分對(duì)應(yīng)功能模塊; 點(diǎn)擊導(dǎo)航欄 Navigation 右上角按鈕,進(jìn)入 PeerInfoScreen 對(duì)應(yīng)場(chǎng)景。

三、設(shè)置模塊:PeerInfoScreen

image.png

以默認(rèn)設(shè)置模塊為例:

  • @ Set Username: 對(duì)應(yīng) UsernameSetupController ;設(shè)置用戶名。
  • Saved Messages: 對(duì)應(yīng) ChatController ;收藏夾。
  • Recent Calls: 對(duì)應(yīng) CallListController ;最近呼叫。
  • Devices: 對(duì)應(yīng) RecentSessionsController ;設(shè)備。
  • Chat Folders: 對(duì)應(yīng) ChatListFilterPresetListController ;對(duì)話文件夾。
  • Notifications and Sounds: 對(duì)應(yīng) NotificationsAndSoundsController ;通知和聲音。
  • Privacy and Security: 對(duì)應(yīng) PrivacyAndSecurityController ;隱私和安全。
  • Data and Storage: 對(duì)應(yīng) DataAndStorageSettingsController ;數(shù)據(jù)和存儲(chǔ)。
  • Appearance: 對(duì)應(yīng) ThemeSettingsController ;外觀。
  • Language: 對(duì)應(yīng) LocalizationListController ;語(yǔ)言。
  • Stickers and Emoji: 對(duì)應(yīng) InstalledStickerPacksController ;
  • Ask a Question: 對(duì)應(yīng) ChatController ;我有疑問(wèn)。
  • IM FAQ: 跳轉(zhuǎn)web鏈接Url ;常見(jiàn)問(wèn)題。
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容