From 8bf056e27b51321c776e58c479cd616f92e3f844 Mon Sep 17 00:00:00 2001 From: DrKLO Date: Wed, 14 Apr 2021 04:44:46 +0300 Subject: [PATCH] Update to 7.7.0 (2284) --- Dockerfile | 2 +- TMessagesProj/build.gradle | 28 +- .../release/AndroidManifest_standalone.xml | 67 + TMessagesProj/google-services.json | 91 +- TMessagesProj/jni/CMakeLists.txt | 2 +- TMessagesProj/jni/TgNetWrapper.cpp | 10 +- TMessagesProj/jni/tgnet/ApiScheme.cpp | 8 +- TMessagesProj/jni/tgnet/ApiScheme.h | 3 +- .../jni/tgnet/ConnectionsManager.cpp | 27 +- TMessagesProj/jni/tgnet/ConnectionsManager.h | 4 +- TMessagesProj/src/main/AndroidManifest.xml | 2 - .../telegram/messenger/AndroidUtilities.java | 40 +- .../org/telegram/messenger/BuildVars.java | 4 +- .../org/telegram/messenger/ChatObject.java | 29 +- .../messenger/DownloadController.java | 9 +- .../telegram/messenger/FileLoadOperation.java | 2 +- .../org/telegram/messenger/ImageLocation.java | 61 +- .../org/telegram/messenger/ImageReceiver.java | 4 + .../telegram/messenger/LocaleController.java | 137 +- .../telegram/messenger/MediaController.java | 2 +- .../messenger/MediaDataController.java | 64 +- .../org/telegram/messenger/MessageObject.java | 5 +- .../messenger/MessagesController.java | 55 +- .../telegram/messenger/MessagesStorage.java | 22 +- .../org/telegram/messenger/NativeLoader.java | 2 +- .../messenger/NotificationCenter.java | 1 - .../messenger/NotificationsController.java | 4 + .../messenger/SendMessagesHelper.java | 83 +- .../org/telegram/messenger/SvgHelper.java | 6 +- .../WearDataLayerListenerService.java | 2 +- .../messenger/voip/VoIPBaseService.java | 63 +- .../telegram/messenger/voip/VoIPService.java | 13 +- .../telegram/tgnet/ConnectionsManager.java | 13 +- .../main/java/org/telegram/tgnet/TLRPC.java | 1612 ++++++++----- .../ui/ActionBar/ActionBarLayout.java | 42 +- .../telegram/ui/ActionBar/ActionBarMenu.java | 1 - .../ui/ActionBar/ActionBarMenuItem.java | 4 +- .../telegram/ui/ActionBar/AlertDialog.java | 31 +- .../telegram/ui/ActionBar/BaseFragment.java | 23 +- .../telegram/ui/ActionBar/BottomSheet.java | 7 + .../ui/ActionBar/DrawerLayoutContainer.java | 8 + .../telegram/ui/ActionBar/SimpleTextView.java | 82 +- .../java/org/telegram/ui/ActionBar/Theme.java | 2 + .../telegram/ui/Adapters/DialogsAdapter.java | 8 - .../ui/Adapters/DrawerLayoutAdapter.java | 2 +- .../org/telegram/ui/Adapters/FiltersView.java | 6 +- .../java/org/telegram/ui/ArticleViewer.java | 44 +- .../java/org/telegram/ui/AvatarPreviewer.java | 16 +- .../ui/CancelAccountDeletionActivity.java | 5 +- .../telegram/ui/Cells/AccountSelectCell.java | 6 +- .../telegram/ui/Cells/AdminedChannelCell.java | 2 +- .../telegram/ui/Cells/ChatMessageCell.java | 91 +- .../telegram/ui/Cells/CheckBoxUserCell.java | 2 +- .../org/telegram/ui/Cells/DialogCell.java | 12 +- .../telegram/ui/Cells/DialogMeUrlCell.java | 6 +- .../telegram/ui/Cells/DrawerProfileCell.java | 2 +- .../org/telegram/ui/Cells/DrawerUserCell.java | 2 +- .../ui/Cells/GroupCallInvitedCell.java | 2 +- .../telegram/ui/Cells/GroupCallUserCell.java | 159 +- .../ui/Cells/GroupCreateUserCell.java | 4 +- .../org/telegram/ui/Cells/HintDialogCell.java | 6 +- .../telegram/ui/Cells/JoinSheetUserCell.java | 2 +- .../telegram/ui/Cells/ManageChatUserCell.java | 4 +- .../org/telegram/ui/Cells/MentionCell.java | 6 +- .../telegram/ui/Cells/PaymentInfoCell.java | 55 +- .../telegram/ui/Cells/ProfileSearchCell.java | 4 +- .../org/telegram/ui/Cells/SessionCell.java | 2 +- .../telegram/ui/Cells/ShareDialogCell.java | 47 +- .../ui/Cells/SharingLiveLocationCell.java | 16 +- .../ui/Cells/StatisticPostInfoCell.java | 2 +- .../java/org/telegram/ui/Cells/UserCell.java | 4 +- .../java/org/telegram/ui/Cells/UserCell2.java | 4 +- .../org/telegram/ui/ChangePhoneActivity.java | 5 +- .../telegram/ui/ChannelAdminLogActivity.java | 2 +- .../telegram/ui/ChannelCreateActivity.java | 2 +- .../java/org/telegram/ui/ChatActivity.java | 210 +- .../org/telegram/ui/ChatEditActivity.java | 10 +- .../org/telegram/ui/ChatLinkActivity.java | 2 +- .../org/telegram/ui/ChatUsersActivity.java | 7 +- .../telegram/ui/Components/AlertsCreator.java | 388 +++- .../ui/Components/AvatarsImageView.java | 4 +- .../org/telegram/ui/Components/Bulletin.java | 3 + .../ui/Components/BulletinFactory.java | 2 + .../ui/Components/ChatActivityEnterView.java | 7 +- .../ui/Components/ChatAttachAlert.java | 50 +- .../ChatAttachAlertContactsLayout.java | 2 +- .../ChatAttachAlertPhotoLayout.java | 42 +- .../ui/Components/ChatAvatarContainer.java | 8 +- .../ui/Components/ChatGreetingsView.java | 35 +- .../ui/Components/ContextProgressView.java | 22 +- .../ui/Components/FilterTabsView.java | 8 + .../ui/Components/FragmentContextView.java | 146 +- .../FragmentContextViewWavesDrawable.java | 10 +- .../ui/Components/GroupCreateSpan.java | 4 +- .../org/telegram/ui/Components/HintView.java | 10 +- .../telegram/ui/Components/ImageUpdater.java | 12 +- .../telegram/ui/Components/JoinCallAlert.java | 401 +++- .../ui/Components/JoinCallByUrlAlert.java | 2 +- .../ui/Components/JoinGroupAlert.java | 2 +- .../telegram/ui/Components/NumberPicker.java | 1 + .../ui/Components/PhonebookShareAlert.java | 2 +- .../ui/Components/PollVotesAlert.java | 2 +- .../ui/Components/ProfileGalleryView.java | 459 ++-- .../ui/Components/PullForegroundDrawable.java | 2 +- .../ui/Components/RecyclerListView.java | 2 +- .../ui/Components/ScrollSlidingTabStrip.java | 2 +- .../telegram/ui/Components/ShareAlert.java | 6 +- .../ui/Components/SharedMediaLayout.java | 36 + .../org/telegram/ui/Components/UndoView.java | 50 +- .../ui/Components/VideoForwardDrawable.java | 124 +- .../ui/Components/VideoPlayerSeekBar.java | 61 +- .../ui/Components/voip/VoIPHelper.java | 21 +- .../ui/Components/voip/VoIPToggleButton.java | 23 +- .../org/telegram/ui/ContactAddActivity.java | 2 +- .../java/org/telegram/ui/DialogsActivity.java | 184 +- .../org/telegram/ui/GroupCallActivity.java | 2060 +++++++++++++---- .../telegram/ui/GroupCreateFinalActivity.java | 2 +- .../java/org/telegram/ui/LaunchActivity.java | 57 +- .../org/telegram/ui/LocationActivity.java | 2 +- .../java/org/telegram/ui/LoginActivity.java | 52 +- .../telegram/ui/MessageStatisticActivity.java | 2 +- .../org/telegram/ui/PassportActivity.java | 10 +- .../org/telegram/ui/PaymentFormActivity.java | 815 +++++-- .../java/org/telegram/ui/PhotoViewer.java | 270 ++- .../org/telegram/ui/PinchToZoomHelper.java | 708 ++++++ .../ui/PopupNotificationActivity.java | 4 +- .../telegram/ui/PrivacySettingsActivity.java | 13 + .../java/org/telegram/ui/ProfileActivity.java | 188 +- .../java/org/telegram/ui/VoIPFragment.java | 22 +- .../src/main/res/drawable-hdpi/bot_card.png | Bin 0 -> 228 bytes .../src/main/res/drawable-hdpi/msg_addbio.png | Bin 0 -> 1050 bytes .../src/main/res/drawable-hdpi/msg_bio.png | Bin 0 -> 894 bytes .../msg_report_abuse.png | Bin .../msg_report_fake.png | Bin .../msg_report_other.png | Bin .../msg_report_spam.png | Bin .../msg_report_violence.png | Bin .../msg_report_xxx.png | Bin .../main/res/drawable-hdpi/msg_timeredit.png | Bin 0 -> 1086 bytes .../main/res/drawable-hdpi/msg_voiceshare.png | Bin 0 -> 678 bytes .../res/drawable-hdpi/payment_address.png | Bin 0 -> 930 bytes .../main/res/drawable-hdpi/payment_card.png | Bin 0 -> 451 bytes .../res/drawable-hdpi/payment_delivery.png | Bin 0 -> 842 bytes .../main/res/drawable-hdpi/payment_email.png | Bin 0 -> 1116 bytes .../main/res/drawable-hdpi/payment_name.png | Bin 0 -> 767 bytes .../main/res/drawable-hdpi/payment_phone.png | Bin 0 -> 778 bytes .../res/drawable-hdpi/payment_provider.png | Bin 0 -> 740 bytes .../src/main/res/drawable-mdpi/bot_card.png | Bin 0 -> 220 bytes .../src/main/res/drawable-mdpi/msg_addbio.png | Bin 0 -> 685 bytes .../src/main/res/drawable-mdpi/msg_bio.png | Bin 0 -> 599 bytes .../main/res/drawable-mdpi/msg_timeredit.png | Bin 0 -> 726 bytes .../main/res/drawable-mdpi/msg_voiceshare.png | Bin 0 -> 479 bytes .../res/drawable-mdpi/payment_address.png | Bin 0 -> 630 bytes .../main/res/drawable-mdpi/payment_card.png | Bin 0 -> 368 bytes .../res/drawable-mdpi/payment_delivery.png | Bin 0 -> 628 bytes .../main/res/drawable-mdpi/payment_email.png | Bin 0 -> 713 bytes .../main/res/drawable-mdpi/payment_name.png | Bin 0 -> 504 bytes .../main/res/drawable-mdpi/payment_phone.png | Bin 0 -> 528 bytes .../res/drawable-mdpi/payment_provider.png | Bin 0 -> 523 bytes .../src/main/res/drawable-xhdpi/bot_card.png | Bin 0 -> 259 bytes .../main/res/drawable-xhdpi/msg_addbio.png | Bin 0 -> 1324 bytes .../src/main/res/drawable-xhdpi/msg_bio.png | Bin 0 -> 1210 bytes .../main/res/drawable-xhdpi/msg_timeredit.png | Bin 0 -> 1437 bytes .../res/drawable-xhdpi/msg_voiceshare.png | Bin 0 -> 862 bytes .../res/drawable-xhdpi/payment_address.png | Bin 0 -> 1220 bytes .../main/res/drawable-xhdpi/payment_card.png | Bin 0 -> 569 bytes .../res/drawable-xhdpi/payment_delivery.png | Bin 0 -> 1164 bytes .../main/res/drawable-xhdpi/payment_email.png | Bin 0 -> 1471 bytes .../main/res/drawable-xhdpi/payment_name.png | Bin 0 -> 863 bytes .../main/res/drawable-xhdpi/payment_phone.png | Bin 0 -> 994 bytes .../res/drawable-xhdpi/payment_provider.png | Bin 0 -> 906 bytes .../src/main/res/drawable-xxhdpi/bot_card.png | Bin 0 -> 333 bytes .../main/res/drawable-xxhdpi/msg_addbio.png | Bin 0 -> 1986 bytes .../src/main/res/drawable-xxhdpi/msg_bio.png | Bin 0 -> 1715 bytes .../res/drawable-xxhdpi/msg_timeredit.png | Bin 0 -> 2185 bytes .../res/drawable-xxhdpi/msg_voiceshare.png | Bin 0 -> 1356 bytes .../res/drawable-xxhdpi/payment_address.png | Bin 0 -> 1855 bytes .../main/res/drawable-xxhdpi/payment_card.png | Bin 0 -> 692 bytes .../res/drawable-xxhdpi/payment_delivery.png | Bin 0 -> 1544 bytes .../res/drawable-xxhdpi/payment_email.png | Bin 0 -> 2144 bytes .../main/res/drawable-xxhdpi/payment_name.png | Bin 0 -> 1231 bytes .../res/drawable-xxhdpi/payment_phone.png | Bin 0 -> 1438 bytes .../res/drawable-xxhdpi/payment_provider.png | Bin 0 -> 1250 bytes .../res/mipmap-anydpi-v26/ic_launcher_sa.xml | 5 + .../main/res/mipmap-hdpi/ic_launcher_sa.png | Bin 0 -> 5750 bytes .../res/mipmap-hdpi/icon_background_sa.png | Bin 0 -> 11868 bytes .../res/mipmap-hdpi/icon_foreground_sa.png | Bin 0 -> 1857 bytes .../main/res/mipmap-mdpi/ic_launcher_sa.png | Bin 0 -> 3179 bytes .../res/mipmap-mdpi/icon_background_sa.png | Bin 0 -> 7015 bytes .../res/mipmap-mdpi/icon_foreground_sa.png | Bin 0 -> 1178 bytes .../main/res/mipmap-xhdpi/ic_launcher_sa.png | Bin 0 -> 8405 bytes .../res/mipmap-xhdpi/icon_background_sa.png | Bin 0 -> 17542 bytes .../res/mipmap-xhdpi/icon_foreground_sa.png | Bin 0 -> 2868 bytes .../main/res/mipmap-xxhdpi/ic_launcher_sa.png | Bin 0 -> 15490 bytes .../res/mipmap-xxhdpi/icon_background_sa.png | Bin 0 -> 33126 bytes .../res/mipmap-xxhdpi/icon_foreground_sa.png | Bin 0 -> 5036 bytes .../res/mipmap-xxxhdpi/ic_launcher_sa.png | Bin 0 -> 23169 bytes .../res/mipmap-xxxhdpi/icon_background_sa.png | Bin 0 -> 51199 bytes .../res/mipmap-xxxhdpi/icon_foreground_sa.png | Bin 0 -> 7553 bytes .../src/main/res/raw/contacts_sync_off.json | 1 + .../src/main/res/raw/contacts_sync_on.json | 1 + TMessagesProj/src/main/res/raw/folder_in.json | 1 + .../src/main/res/raw/folder_out.json | 1 + TMessagesProj/src/main/res/raw/hand_2.json | 1 + .../src/main/res/raw/payment_success.json | 1 + .../src/main/res/raw/utyan_schedule.tgs | 1 + .../src/main/res/raw/voip_filled.json | 1 + .../src/main/res/values-v21/styles.xml | 8 +- TMessagesProj/src/main/res/values/strings.xml | 85 + 209 files changed, 7639 insertions(+), 2243 deletions(-) create mode 100644 TMessagesProj/config/release/AndroidManifest_standalone.xml create mode 100644 TMessagesProj/src/main/java/org/telegram/ui/PinchToZoomHelper.java create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/bot_card.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/msg_addbio.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/msg_bio.png rename TMessagesProj/src/main/res/{mipmap-mdpi => drawable-hdpi}/msg_report_abuse.png (100%) rename TMessagesProj/src/main/res/{mipmap-mdpi => drawable-hdpi}/msg_report_fake.png (100%) rename TMessagesProj/src/main/res/{mipmap-mdpi => drawable-hdpi}/msg_report_other.png (100%) rename TMessagesProj/src/main/res/{mipmap-mdpi => drawable-hdpi}/msg_report_spam.png (100%) rename TMessagesProj/src/main/res/{mipmap-mdpi => drawable-hdpi}/msg_report_violence.png (100%) rename TMessagesProj/src/main/res/{mipmap-mdpi => drawable-hdpi}/msg_report_xxx.png (100%) create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/msg_timeredit.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/msg_voiceshare.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/payment_address.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/payment_card.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/payment_delivery.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/payment_email.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/payment_name.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/payment_phone.png create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/payment_provider.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/bot_card.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/msg_addbio.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/msg_bio.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/msg_timeredit.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/msg_voiceshare.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/payment_address.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/payment_card.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/payment_delivery.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/payment_email.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/payment_name.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/payment_phone.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/payment_provider.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/bot_card.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/msg_addbio.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/msg_bio.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/msg_timeredit.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/msg_voiceshare.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/payment_address.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/payment_card.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/payment_delivery.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/payment_email.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/payment_name.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/payment_phone.png create mode 100644 TMessagesProj/src/main/res/drawable-xhdpi/payment_provider.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/bot_card.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/msg_addbio.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/msg_bio.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/msg_timeredit.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/msg_voiceshare.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/payment_address.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/payment_card.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/payment_delivery.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/payment_email.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/payment_name.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/payment_phone.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/payment_provider.png create mode 100644 TMessagesProj/src/main/res/mipmap-anydpi-v26/ic_launcher_sa.xml create mode 100644 TMessagesProj/src/main/res/mipmap-hdpi/ic_launcher_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-hdpi/icon_background_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-hdpi/icon_foreground_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-mdpi/ic_launcher_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-mdpi/icon_background_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-mdpi/icon_foreground_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xhdpi/ic_launcher_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xhdpi/icon_background_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xhdpi/icon_foreground_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xxhdpi/ic_launcher_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xxhdpi/icon_background_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xxhdpi/icon_foreground_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xxxhdpi/ic_launcher_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xxxhdpi/icon_background_sa.png create mode 100644 TMessagesProj/src/main/res/mipmap-xxxhdpi/icon_foreground_sa.png create mode 100644 TMessagesProj/src/main/res/raw/contacts_sync_off.json create mode 100644 TMessagesProj/src/main/res/raw/contacts_sync_on.json create mode 100644 TMessagesProj/src/main/res/raw/folder_in.json create mode 100644 TMessagesProj/src/main/res/raw/folder_out.json create mode 100644 TMessagesProj/src/main/res/raw/hand_2.json create mode 100644 TMessagesProj/src/main/res/raw/payment_success.json create mode 100644 TMessagesProj/src/main/res/raw/utyan_schedule.tgs create mode 100644 TMessagesProj/src/main/res/raw/voip_filled.json diff --git a/Dockerfile b/Dockerfile index 011f39929..7f0a37ea5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,4 +24,4 @@ RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSIO ENV PATH ${ANDROID_NDK_HOME}:$PATH ENV PATH ${ANDROID_NDK_HOME}/prebuilt/linux-x86_64/bin/:$PATH -CMD mkdir -p /home/source/TMessagesProj/build/outputs/apk && mkdir -p /home/source/TMessagesProj/build/outputs/native-debug-symbols && cp -R /home/source/. /home/gradle && cd /home/gradle && gradle assembleRelease && cp -R /home/gradle/TMessagesProj/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && cp -R /home/gradle/TMessagesProj/build/outputs/native-debug-symbols/. /home/source/TMessagesProj/build/outputs/native-debug-symbols +CMD mkdir -p /home/source/TMessagesProj/build/outputs/apk && mkdir -p /home/source/TMessagesProj/build/outputs/native-debug-symbols && cp -R /home/source/. /home/gradle && cd /home/gradle && gradle assembleRelease && gradle assembleStandalone && cp -R /home/gradle/TMessagesProj/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && cp -R /home/gradle/TMessagesProj/build/outputs/native-debug-symbols/. /home/source/TMessagesProj/build/outputs/native-debug-symbols diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 68e83acd4..cf50a975a 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -143,6 +143,17 @@ android { ndk.debugSymbolLevel = 'FULL' } + standalone { + debuggable false + jniDebuggable false + signingConfig signingConfigs.release + applicationIdSuffix ".web" + minifyEnabled true + multiDexEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + ndk.debugSymbolLevel = 'FULL' + } + release { debuggable false jniDebuggable false @@ -167,6 +178,10 @@ android { manifest.srcFile 'config/debug/AndroidManifest.xml' } + sourceSets.standalone { + manifest.srcFile 'config/release/AndroidManifest.xml' + } + sourceSets.release { manifest.srcFile 'config/release/AndroidManifest.xml' } @@ -243,9 +258,6 @@ android { sourceSets.debug { manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' } - /*sourceSets.debugAsan { - manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' - }*/ sourceSets.release { manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' } @@ -276,19 +288,19 @@ android { sourceSets.debug { manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' } - /*sourceSets.debugAsan { - manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' - }*/ sourceSets.release { manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' } + sourceSets.standalone { + manifest.srcFile 'config/release/AndroidManifest_standalone.xml' + } ext { abiVersionCode = 9 } } } - defaultConfig.versionCode = 2274 + defaultConfig.versionCode = 2284 applicationVariants.all { variant -> variant.outputs.all { output -> @@ -307,7 +319,7 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 29 - versionName "7.6.1" + versionName "7.7.0" vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] diff --git a/TMessagesProj/config/release/AndroidManifest_standalone.xml b/TMessagesProj/config/release/AndroidManifest_standalone.xml new file mode 100644 index 000000000..3c87a4403 --- /dev/null +++ b/TMessagesProj/config/release/AndroidManifest_standalone.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TMessagesProj/google-services.json b/TMessagesProj/google-services.json index 019c926bc..640e841b2 100755 --- a/TMessagesProj/google-services.json +++ b/TMessagesProj/google-services.json @@ -6,35 +6,6 @@ "storage_bucket": "tmessages2.appspot.com" }, "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:760348033671:android:dc022572c167a16c", - "android_client_info": { - "package_name": "org.telegram.messenger.beta" - } - }, - "oauth_client": [ - { - "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "760348033671-jiv412evc1r36rl4k7vhl1ba83atdmot.apps.googleusercontent.com", - "client_type": 3 - } - ] - } - } - }, { "client_info": { "mobilesdk_app_id": "1:760348033671:android:f6afd7b67eae3860", @@ -57,7 +28,65 @@ "appinvite_service": { "other_platform_oauth_client": [ { - "client_id": "760348033671-jiv412evc1r36rl4k7vhl1ba83atdmot.apps.googleusercontent.com", + "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:760348033671:android:dc022572c167a16c", + "android_client_info": { + "package_name": "org.telegram.messenger.beta" + } + }, + "oauth_client": [ + { + "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:760348033671:android:7396e651423888c3f66e22", + "android_client_info": { + "package_name": "org.telegram.messenger.web" + } + }, + "oauth_client": [ + { + "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com", "client_type": 3 } ] @@ -66,4 +95,4 @@ } ], "configuration_version": "1" -} +} \ No newline at end of file diff --git a/TMessagesProj/jni/CMakeLists.txt b/TMessagesProj/jni/CMakeLists.txt index 579b8ec23..d955668c6 100644 --- a/TMessagesProj/jni/CMakeLists.txt +++ b/TMessagesProj/jni/CMakeLists.txt @@ -399,7 +399,7 @@ target_compile_definitions(sqlite PUBLIC #voip include(${CMAKE_HOME_DIRECTORY}/voip/CMakeLists.txt) -set(NATIVE_LIB "tmessages.37") +set(NATIVE_LIB "tmessages.38") #tmessages add_library(${NATIVE_LIB} SHARED diff --git a/TMessagesProj/jni/TgNetWrapper.cpp b/TMessagesProj/jni/TgNetWrapper.cpp index 84f9bb4cd..aa7c4c933 100644 --- a/TMessagesProj/jni/TgNetWrapper.cpp +++ b/TMessagesProj/jni/TgNetWrapper.cpp @@ -371,7 +371,7 @@ void setSystemLangCode(JNIEnv *env, jclass c, jint instanceNum, jstring langCode } } -void init(JNIEnv *env, jclass c, jint instanceNum, jint version, jint layer, jint apiId, jstring deviceModel, jstring systemVersion, jstring appVersion, jstring langCode, jstring systemLangCode, jstring configPath, jstring logPath, jstring regId, jstring cFingerprint, jstring installerId, jint timezoneOffset, jint userId, jboolean enablePushConnection, jboolean hasNetwork, jint networkType) { +void init(JNIEnv *env, jclass c, jint instanceNum, jint version, jint layer, jint apiId, jstring deviceModel, jstring systemVersion, jstring appVersion, jstring langCode, jstring systemLangCode, jstring configPath, jstring logPath, jstring regId, jstring cFingerprint, jstring installerId, jstring packageId, jint timezoneOffset, jint userId, jboolean enablePushConnection, jboolean hasNetwork, jint networkType) { const char *deviceModelStr = env->GetStringUTFChars(deviceModel, 0); const char *systemVersionStr = env->GetStringUTFChars(systemVersion, 0); const char *appVersionStr = env->GetStringUTFChars(appVersion, 0); @@ -382,8 +382,9 @@ void init(JNIEnv *env, jclass c, jint instanceNum, jint version, jint layer, jin const char *regIdStr = env->GetStringUTFChars(regId, 0); const char *cFingerprintStr = env->GetStringUTFChars(cFingerprint, 0); const char *installerIdStr = env->GetStringUTFChars(installerId, 0); + const char *packageIdStr = env->GetStringUTFChars(packageId, 0); - ConnectionsManager::getInstance(instanceNum).init((uint32_t) version, layer, apiId, std::string(deviceModelStr), std::string(systemVersionStr), std::string(appVersionStr), std::string(langCodeStr), std::string(systemLangCodeStr), std::string(configPathStr), std::string(logPathStr), std::string(regIdStr), std::string(cFingerprintStr), std::string(installerIdStr), timezoneOffset, userId, true, enablePushConnection, hasNetwork, networkType); + ConnectionsManager::getInstance(instanceNum).init((uint32_t) version, layer, apiId, std::string(deviceModelStr), std::string(systemVersionStr), std::string(appVersionStr), std::string(langCodeStr), std::string(systemLangCodeStr), std::string(configPathStr), std::string(logPathStr), std::string(regIdStr), std::string(cFingerprintStr), std::string(installerIdStr), std::string(packageIdStr), timezoneOffset, userId, true, enablePushConnection, hasNetwork, networkType); if (deviceModelStr != 0) { env->ReleaseStringUTFChars(deviceModel, deviceModelStr); @@ -415,6 +416,9 @@ void init(JNIEnv *env, jclass c, jint instanceNum, jint version, jint layer, jin if (installerIdStr != 0) { env->ReleaseStringUTFChars(installerId, installerIdStr); } + if (packageIdStr != 0) { + env->ReleaseStringUTFChars(packageId, packageIdStr); + } } void setJava(JNIEnv *env, jclass c, jboolean useJavaByteBuffers) { @@ -440,7 +444,7 @@ static JNINativeMethod ConnectionsManagerMethods[] = { {"native_setProxySettings", "(ILjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", (void *) setProxySettings}, {"native_getConnectionState", "(I)I", (void *) getConnectionState}, {"native_setUserId", "(II)V", (void *) setUserId}, - {"native_init", "(IIIILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIZZI)V", (void *) init}, + {"native_init", "(IIIILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIZZI)V", (void *) init}, {"native_setLangCode", "(ILjava/lang/String;)V", (void *) setLangCode}, {"native_setRegId", "(ILjava/lang/String;)V", (void *) setRegId}, {"native_setSystemLangCode", "(ILjava/lang/String;)V", (void *) setSystemLangCode}, diff --git a/TMessagesProj/jni/tgnet/ApiScheme.cpp b/TMessagesProj/jni/tgnet/ApiScheme.cpp index 62c23955a..e638324f9 100644 --- a/TMessagesProj/jni/tgnet/ApiScheme.cpp +++ b/TMessagesProj/jni/tgnet/ApiScheme.cpp @@ -1172,7 +1172,7 @@ UserProfilePhoto *UserProfilePhoto::TLdeserialize(NativeByteBuffer *stream, uint case 0x4f11bae1: result = new TL_userProfilePhotoEmpty(); break; - case 0x69d3ab26: + case 0xcc656077: result = new TL_userProfilePhoto(); break; default: @@ -1194,6 +1194,9 @@ void TL_userProfilePhoto::readParams(NativeByteBuffer *stream, int32_t instanceN photo_id = stream->readInt64(&error); photo_small = std::unique_ptr(FileLocation::TLdeserialize(stream, stream->readUint32(&error), instanceNum, error)); photo_big = std::unique_ptr(FileLocation::TLdeserialize(stream, stream->readUint32(&error), instanceNum, error)); + if ((flags & 2) != 0) { + stripped_thumb = std::unique_ptr(stream->readByteArray(&error)); + } dc_id = stream->readInt32(&error); } @@ -1204,6 +1207,9 @@ void TL_userProfilePhoto::serializeToStream(NativeByteBuffer *stream) { stream->writeInt64(photo_id); photo_small->serializeToStream(stream); photo_big->serializeToStream(stream); + if ((flags & 2) != 0) { + stream->writeByteArray(stripped_thumb.get()); + } stream->writeInt32(dc_id); } diff --git a/TMessagesProj/jni/tgnet/ApiScheme.h b/TMessagesProj/jni/tgnet/ApiScheme.h index 330579d37..132441805 100644 --- a/TMessagesProj/jni/tgnet/ApiScheme.h +++ b/TMessagesProj/jni/tgnet/ApiScheme.h @@ -257,6 +257,7 @@ public: int64_t photo_id; std::unique_ptr photo_small; std::unique_ptr photo_big; + std::unique_ptr stripped_thumb; int32_t dc_id; static UserProfilePhoto *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); @@ -273,7 +274,7 @@ public: class TL_userProfilePhoto : public UserProfilePhoto { public: - static const uint32_t constructor = 0x69d3ab26; + static const uint32_t constructor = 0xcc656077; void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); void serializeToStream(NativeByteBuffer *stream); diff --git a/TMessagesProj/jni/tgnet/ConnectionsManager.cpp b/TMessagesProj/jni/tgnet/ConnectionsManager.cpp index 5a8a92362..518c6d17f 100644 --- a/TMessagesProj/jni/tgnet/ConnectionsManager.cpp +++ b/TMessagesProj/jni/tgnet/ConnectionsManager.cpp @@ -2494,6 +2494,7 @@ void ConnectionsManager::processRequestQueue(uint32_t connectionTypes, uint32_t if (request->rawRequest->initFunc != nullptr) { request->rawRequest->initFunc(request->messageId); } + if (LOGS_ENABLED) DEBUG_D("messageId for token = %d, 0x%" PRIx64, request->requestToken, request->messageId); uint32_t requestLength = request->rpcRequest->getObjectSize(); if (request->requestFlags & RequestFlagCanCompress) { @@ -2593,8 +2594,8 @@ void ConnectionsManager::processRequestQueue(uint32_t connectionTypes, uint32_t Datacenter *datacenter = getDatacenterWithId(iter->first); if (datacenter != nullptr) { bool scannedPreviousRequests = false; - int64_t lastSentMessageRpcId = 0; bool needQuickAck = false; + int64_t lastSentMessageRpcId = 0; std::vector> &array = iter->second; size_t count = array.size(); for (uint32_t b = 0; b < count; b++) { @@ -2609,13 +2610,18 @@ void ConnectionsManager::processRequestQueue(uint32_t connectionTypes, uint32_t std::vector currentRequests; for (uint32_t a = 0; a < count; a++) { NetworkMessage *currentNetworkMessage = array[a].get(); - TL_message *currentMessage = currentNetworkMessage->message.get(); if (currentNetworkMessage->invokeAfter) { - currentRequests.push_back(currentMessage->msg_id); + currentRequests.push_back(currentNetworkMessage->message->msg_id); } } int64_t maxRequestId = 0; + if (lastInvokeAfterMessageId != 0) { + int64_t timeMessage = (int64_t) (lastInvokeAfterMessageId / 4294967296.0); + if (getCurrentTime() - timeMessage <= 30) { + maxRequestId = lastInvokeAfterMessageId; + } + } for (requestsIter iter2 = runningRequests.begin(); iter2 != runningRequests.end(); iter2++) { Request *request = iter2->get(); if (request->requestFlags & RequestFlagInvokeAfter) { @@ -2634,11 +2640,11 @@ void ConnectionsManager::processRequestQueue(uint32_t connectionTypes, uint32_t TL_invokeAfterMsg *request = new TL_invokeAfterMsg(); request->msg_id = lastSentMessageRpcId; if (message->outgoingBody != nullptr) { - if (LOGS_ENABLED) DEBUG_D("wrap outgoingBody(%p, %s) to TL_invokeAfterMsg", message->outgoingBody, typeid(*message->outgoingBody).name()); + if (LOGS_ENABLED) DEBUG_D("wrap outgoingBody(%p, %s) to TL_invokeAfterMsg, token = %d, after 0x%" PRIx64, message->outgoingBody, typeid(*message->outgoingBody).name(), networkMessage->requestId, request->msg_id); request->outgoingQuery = message->outgoingBody; message->outgoingBody = nullptr; } else { - if (LOGS_ENABLED) DEBUG_D("wrap body(%p, %s) to TL_invokeAfterMsg", message->body.get(), typeid(*(message->body.get())).name()); + if (LOGS_ENABLED) DEBUG_D("wrap body(%p, %s) to TL_invokeAfterMsg, token = %d, after 0x%" PRIx64, message->body.get(), typeid(*(message->body.get())).name(), networkMessage->requestId, request->msg_id); request->query = std::move(message->body); } message->body = std::unique_ptr(request); @@ -2646,6 +2652,7 @@ void ConnectionsManager::processRequestQueue(uint32_t connectionTypes, uint32_t } lastSentMessageRpcId = message->msg_id; + lastInvokeAfterMessageId = message->msg_id; } } @@ -2764,6 +2771,13 @@ std::unique_ptr ConnectionsManager::wrapInLayer(TLObject *object, Data objectValue->key = "installer"; objectValue->value = std::unique_ptr(jsonString); + objectValue = new TL_jsonObjectValue(); + jsonObject->value.push_back(std::unique_ptr(objectValue)); + jsonString = new TL_jsonString(); + jsonString->value = package; + objectValue->key = "package_id"; + objectValue->value = std::unique_ptr(jsonString); + objectValue = new TL_jsonObjectValue(); jsonObject->value.push_back(std::unique_ptr(objectValue)); @@ -3212,7 +3226,7 @@ void ConnectionsManager::applyDnsConfig(NativeByteBuffer *buffer, std::string ph }); } -void ConnectionsManager::init(uint32_t version, int32_t layer, int32_t apiId, std::string deviceModel, std::string systemVersion, std::string appVersion, std::string langCode, std::string systemLangCode, std::string configPath, std::string logPath, std::string regId, std::string cFingerpting, std::string installerId, int32_t timezoneOffset, int32_t userId, bool isPaused, bool enablePushConnection, bool hasNetwork, int32_t networkType) { +void ConnectionsManager::init(uint32_t version, int32_t layer, int32_t apiId, std::string deviceModel, std::string systemVersion, std::string appVersion, std::string langCode, std::string systemLangCode, std::string configPath, std::string logPath, std::string regId, std::string cFingerpting, std::string installerId, std::string packageId, int32_t timezoneOffset, int32_t userId, bool isPaused, bool enablePushConnection, bool hasNetwork, int32_t networkType) { currentVersion = version; currentLayer = layer; currentApiId = apiId; @@ -3224,6 +3238,7 @@ void ConnectionsManager::init(uint32_t version, int32_t layer, int32_t apiId, st currentRegId = regId; certFingerprint = cFingerpting; installer = installerId; + package = packageId; currentDeviceTimezone = timezoneOffset; currentSystemLangCode = systemLangCode; currentUserId = userId; diff --git a/TMessagesProj/jni/tgnet/ConnectionsManager.h b/TMessagesProj/jni/tgnet/ConnectionsManager.h index d44a9d589..740e86830 100644 --- a/TMessagesProj/jni/tgnet/ConnectionsManager.h +++ b/TMessagesProj/jni/tgnet/ConnectionsManager.h @@ -63,7 +63,7 @@ public: void pauseNetwork(); void setNetworkAvailable(bool value, int32_t type, bool slow); void setIpStrategy(uint8_t value); - void init(uint32_t version, int32_t layer, int32_t apiId, std::string deviceModel, std::string systemVersion, std::string appVersion, std::string langCode, std::string systemLangCode, std::string configPath, std::string logPath, std::string regId, std::string cFingerprint, std::string installerId, int32_t timezoneOffset, int32_t userId, bool isPaused, bool enablePushConnection, bool hasNetwork, int32_t networkType); + void init(uint32_t version, int32_t layer, int32_t apiId, std::string deviceModel, std::string systemVersion, std::string appVersion, std::string langCode, std::string systemLangCode, std::string configPath, std::string logPath, std::string regId, std::string cFingerprint, std::string installerId, std::string packageId, int32_t timezoneOffset, int32_t userId, bool isPaused, bool enablePushConnection, bool hasNetwork, int32_t networkType); void setProxySettings(std::string address, uint16_t port, std::string username, std::string password, std::string secret); void setLangCode(std::string langCode); void setRegId(std::string regId); @@ -206,6 +206,7 @@ private: requestsList runningRequests; std::vector requestingSaltsForDc; int32_t lastPingId = 0; + int64_t lastInvokeAfterMessageId = 0; int32_t currentNetworkType = NETWORK_TYPE_WIFI; uint32_t currentVersion = 1; @@ -218,6 +219,7 @@ private: std::string currentRegId; std::string certFingerprint; std::string installer; + std::string package; int32_t currentDeviceTimezone = 0; std::string currentSystemLangCode; std::string currentConfigPath; diff --git a/TMessagesProj/src/main/AndroidManifest.xml b/TMessagesProj/src/main/AndroidManifest.xml index f09039892..a25e951b0 100644 --- a/TMessagesProj/src/main/AndroidManifest.xml +++ b/TMessagesProj/src/main/AndroidManifest.xml @@ -75,8 +75,6 @@ android:name="org.telegram.messenger.ApplicationLoader" android:allowBackup="false" android:hardwareAccelerated="@bool/useHardwareAcceleration" - android:icon="@mipmap/ic_launcher" - android:roundIcon="@mipmap/ic_launcher_round" android:largeHeap="true" android:theme="@style/Theme.TMessages.Start" android:manageSpaceActivity="org.telegram.ui.ExternalActionActivity" diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java b/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java index d4038df6a..1b80d906b 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java @@ -49,6 +49,7 @@ import android.provider.MediaStore; import android.provider.Settings; import androidx.core.content.FileProvider; +import androidx.core.graphics.ColorUtils; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.viewpager.widget.ViewPager; @@ -185,6 +186,8 @@ public class AndroidUtilities { private static Paint roundPaint; private static RectF bitmapRect; + public static final RectF rectTmp = new RectF(); + public static Pattern WEB_URL = null; static { @@ -365,6 +368,22 @@ public class AndroidUtilities { int end; } + private static Boolean standaloneApp; + public static boolean isStandaloneApp() { + if (standaloneApp == null) { + standaloneApp = "org.telegram.messenger.web".equals(ApplicationLoader.applicationContext.getPackageName()); + } + return standaloneApp; + } + + private static Boolean betaApp; + public static boolean isBetaApp() { + if (betaApp == null) { + betaApp = "org.telegram.messenger.beta".equals(ApplicationLoader.applicationContext.getPackageName()); + } + return betaApp; + } + private static String makeUrl(String url, String[] prefixes, Matcher matcher) { boolean hasPrefix = false; for (int i = 0; i < prefixes.length; i++) { @@ -2477,6 +2496,17 @@ public class AndroidUtilities { } } + public static String formatFullDuration(int duration) { + int h = duration / 3600; + int m = duration / 60 % 60; + int s = duration % 60; + if (duration < 0) { + return String.format(Locale.US, "-%02d:%02d:%02d", Math.abs(h), Math.abs(m), Math.abs(s)); + } else { + return String.format(Locale.US, "%02d:%02d:%02d", h, m, s); + } + } + public static String formatDurationNoHours(int duration, boolean isLong) { int m = duration / 60; int s = duration % 60; @@ -3666,10 +3696,9 @@ public class AndroidUtilities { view.setScaleY(1f); } view.setTag(1); - } else { + } else if (!show && view.getTag() != null){ view.animate().setListener(null).cancel(); if (animated) { - view.animate().alpha(1f).scaleY(1f).scaleX(1f).setDuration(150).start(); view.animate().alpha(0).scaleY(scaleFactor).scaleX(scaleFactor).setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { @@ -3680,6 +3709,13 @@ public class AndroidUtilities { view.setVisibility(View.GONE); } view.setTag(null); + } else if (!animated) { + view.animate().setListener(null).cancel(); + view.setVisibility(show ? View.VISIBLE : View.GONE); + view.setTag(show ? 1 : null); + view.setAlpha(1f); + view.setScaleX(1f); + view.setScaleY(1f); } } } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java index fc2b16a07..e34e8528f 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java @@ -18,8 +18,8 @@ public class BuildVars { public static boolean LOGS_ENABLED = false; public static boolean USE_CLOUD_STRINGS = true; public static boolean CHECK_UPDATES = true; - public static int BUILD_VERSION = 2274; - public static String BUILD_VERSION_STRING = "7.6.0"; + public static int BUILD_VERSION = 2284; + public static String BUILD_VERSION_STRING = "7.7.0"; public static int APP_ID = 4; public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103"; public static String APPCENTER_HASH = "a5b5c4f5-51da-dedc-9918-d9766a22ca7c"; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ChatObject.java b/TMessagesProj/src/main/java/org/telegram/messenger/ChatObject.java index 43512c885..571a75a6d 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ChatObject.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ChatObject.java @@ -100,7 +100,7 @@ public class ChatObject { loadMembers(true); } - public void addSelfDummyParticipant() { + public void addSelfDummyParticipant(boolean notify) { int selfId = getSelfId(); if (participants.indexOfKey(selfId) >= 0) { return; @@ -109,16 +109,29 @@ public class ChatObject { selfDummyParticipant.peer = selfPeer; selfDummyParticipant.muted = true; selfDummyParticipant.self = true; - selfDummyParticipant.can_self_unmute = !call.join_muted; - selfDummyParticipant.date = currentAccount.getConnectionsManager().getCurrentTime(); TLRPC.Chat chat = currentAccount.getMessagesController().getChat(chatId); + selfDummyParticipant.can_self_unmute = !call.join_muted || ChatObject.canManageCalls(chat); + selfDummyParticipant.date = currentAccount.getConnectionsManager().getCurrentTime(); if (ChatObject.canManageCalls(chat) || !ChatObject.isChannel(chat) || chat.megagroup || selfDummyParticipant.can_self_unmute) { selfDummyParticipant.active_date = currentAccount.getConnectionsManager().getCurrentTime(); } + if (selfId > 0) { + TLRPC.UserFull userFull = MessagesController.getInstance(currentAccount.getCurrentAccount()).getUserFull(selfId); + if (userFull != null) { + selfDummyParticipant.about = userFull.about; + } + } else { + TLRPC.ChatFull chatFull = MessagesController.getInstance(currentAccount.getCurrentAccount()).getChatFull(-selfId); + if (chatFull != null) { + selfDummyParticipant.about = chatFull.about; + } + } participants.put(selfId, selfDummyParticipant); sortedParticipants.add(selfDummyParticipant); sortParticipants(); - currentAccount.getNotificationCenter().postNotificationName(NotificationCenter.groupCallUpdated, chatId, call.id, false); + if (notify) { + currentAccount.getNotificationCenter().postNotificationName(NotificationCenter.groupCallUpdated, chatId, call.id, false); + } } public void migrateToChat(TLRPC.Chat chat) { @@ -129,6 +142,14 @@ public class ChatObject { } } + public boolean shouldShowPanel() { + return call.participants_count > 0 || isScheduled(); + } + + public boolean isScheduled() { + return (call.flags & 128) != 0; + } + private int getSelfId() { int selfId; if (selfPeer != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/DownloadController.java b/TMessagesProj/src/main/java/org/telegram/messenger/DownloadController.java index 56dc589c4..dbbf415c7 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/DownloadController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/DownloadController.java @@ -400,7 +400,7 @@ public class DownloadController extends BaseController implements NotificationCe if (type == AUTODOWNLOAD_TYPE_PHOTO) { return PRESET_SIZE_NUM_PHOTO; } else if (type == AUTODOWNLOAD_TYPE_AUDIO) { - return PRESET_SIZE_NUM_AUDIO; + return PRESET_SIZE_NUM_DOCUMENT; } else if (type == AUTODOWNLOAD_TYPE_VIDEO) { return PRESET_SIZE_NUM_VIDEO; } else if (type == AUTODOWNLOAD_TYPE_DOCUMENT) { @@ -663,7 +663,12 @@ public class DownloadController extends BaseController implements NotificationCe preset = getCurrentMobilePreset(); } int mask = preset.mask[index]; - int maxSize = preset.sizes[typeToIndex(type)]; + int maxSize; + if (type == AUTODOWNLOAD_TYPE_AUDIO) { + maxSize = Math.max(512 * 1024, preset.sizes[typeToIndex(type)]); + } else { + maxSize = preset.sizes[typeToIndex(type)]; + } int size = MessageObject.getMessageSize(message); if (isVideo && preset.preloadVideo && size > maxSize && maxSize > 2 * 1024 * 1024) { return (mask & type) != 0 ? 2 : 0; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/FileLoadOperation.java b/TMessagesProj/src/main/java/org/telegram/messenger/FileLoadOperation.java index 47696f882..62edaffb8 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/FileLoadOperation.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/FileLoadOperation.java @@ -196,7 +196,7 @@ public class FileLoadOperation { location.id = imageLocation.location.volume_id; location.volume_id = imageLocation.location.volume_id; location.local_id = imageLocation.location.local_id; - location.big = imageLocation.photoPeerBig; + location.big = imageLocation.photoPeerType == ImageLocation.TYPE_BIG; location.peer = imageLocation.photoPeer; } else if (imageLocation.stickerSet != null) { location = new TLRPC.TL_inputStickerSetThumb(); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ImageLocation.java b/TMessagesProj/src/main/java/org/telegram/messenger/ImageLocation.java index 2b42979fc..e89e5593c 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ImageLocation.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ImageLocation.java @@ -23,7 +23,7 @@ public class ImageLocation { public TLRPC.PhotoSize photoSize; public TLRPC.Photo photo; - public boolean photoPeerBig; + public int photoPeerType; public TLRPC.InputPeer photoPeer; public TLRPC.InputStickerSet stickerSet; public int imageType; @@ -99,14 +99,37 @@ public class ImageLocation { } else { dc_id = photoSize.location.dc_id; } - return getForPhoto(photoSize.location, photoSize.size, photo, null, null, false, dc_id, null, photoSize.type); + return getForPhoto(photoSize.location, photoSize.size, photo, null, null, TYPE_SMALL, dc_id, null, photoSize.type); } - public static ImageLocation getForUser(TLRPC.User user, boolean big) { + public static final int TYPE_BIG = 0; + public static final int TYPE_SMALL = 1; + public static final int TYPE_STRIPPED = 2; + + public static ImageLocation getForUserOrChat(TLObject object, int type) { + if (object instanceof TLRPC.User) { + return getForUser((TLRPC.User) object, type); + } else if (object instanceof TLRPC.Chat) { + return getForChat((TLRPC.Chat) object, type); + } + return null; + } + + public static ImageLocation getForUser(TLRPC.User user, int type) { if (user == null || user.access_hash == 0 || user.photo == null) { return null; } - TLRPC.FileLocation fileLocation = big ? user.photo.photo_big : user.photo.photo_small; + if (type == TYPE_STRIPPED) { + if (user.photo.stripped_thumb == null) { + return null; + } + ImageLocation imageLocation = new ImageLocation(); + imageLocation.photoSize = new TLRPC.TL_photoStrippedSize(); + imageLocation.photoSize.type = "s"; + imageLocation.photoSize.bytes = user.photo.stripped_thumb; + return imageLocation; + } + TLRPC.FileLocation fileLocation = type == TYPE_BIG ? user.photo.photo_big : user.photo.photo_small; if (fileLocation == null) { return null; } @@ -119,14 +142,24 @@ public class ImageLocation { } else { dc_id = fileLocation.dc_id; } - return getForPhoto(fileLocation, 0, null, null, inputPeer, big, dc_id, null, null); + return getForPhoto(fileLocation, 0, null, null, inputPeer, type, dc_id, null, null); } - public static ImageLocation getForChat(TLRPC.Chat chat, boolean big) { + public static ImageLocation getForChat(TLRPC.Chat chat, int type) { if (chat == null || chat.photo == null) { return null; } - TLRPC.FileLocation fileLocation = big ? chat.photo.photo_big : chat.photo.photo_small; + if (type == TYPE_STRIPPED) { + if (chat.photo.stripped_thumb == null) { + return null; + } + ImageLocation imageLocation = new ImageLocation(); + imageLocation.photoSize = new TLRPC.TL_photoStrippedSize(); + imageLocation.photoSize.type = "s"; + imageLocation.photoSize.bytes = chat.photo.stripped_thumb; + return imageLocation; + } + TLRPC.FileLocation fileLocation = type == TYPE_BIG ? chat.photo.photo_big : chat.photo.photo_small; if (fileLocation == null) { return null; } @@ -148,7 +181,7 @@ public class ImageLocation { } else { dc_id = fileLocation.dc_id; } - return getForPhoto(fileLocation, 0, null, null, inputPeer, big, dc_id, null, null); + return getForPhoto(fileLocation, 0, null, null, inputPeer, type, dc_id, null, null); } public static ImageLocation getForSticker(TLRPC.PhotoSize photoSize, TLRPC.Document sticker) { @@ -163,7 +196,7 @@ public class ImageLocation { if (stickerSet == null) { return null; } - ImageLocation imageLocation = getForPhoto(photoSize.location, photoSize.size, null, null, null, false, sticker.dc_id, stickerSet, photoSize.type); + ImageLocation imageLocation = getForPhoto(photoSize.location, photoSize.size, null, null, null, TYPE_SMALL, sticker.dc_id, stickerSet, photoSize.type); if (MessageObject.isAnimatedStickerDocument(sticker, true)) { imageLocation.imageType = FileLoader.IMAGE_TYPE_LOTTIE; } @@ -174,7 +207,7 @@ public class ImageLocation { if (videoSize == null || document == null) { return null; } - ImageLocation location = getForPhoto(videoSize.location, videoSize.size, null, document, null, false, document.dc_id, null, videoSize.type); + ImageLocation location = getForPhoto(videoSize.location, videoSize.size, null, document, null, TYPE_SMALL, document.dc_id, null, videoSize.type); location.imageType = FileLoader.IMAGE_TYPE_ANIMATION; return location; } @@ -183,7 +216,7 @@ public class ImageLocation { if (videoSize == null || photo == null) { return null; } - ImageLocation location = getForPhoto(videoSize.location, videoSize.size, photo, null, null, false, photo.dc_id, null, videoSize.type); + ImageLocation location = getForPhoto(videoSize.location, videoSize.size, photo, null, null, TYPE_SMALL, photo.dc_id, null, videoSize.type); location.imageType = FileLoader.IMAGE_TYPE_ANIMATION; if ((videoSize.flags & 1) != 0) { location.videoSeekTo = (int) (videoSize.video_start_ts * 1000); @@ -199,7 +232,7 @@ public class ImageLocation { } else if (photoSize == null || document == null) { return null; } - return getForPhoto(photoSize.location, photoSize.size, null, document, null, false, document.dc_id, null, photoSize.type); + return getForPhoto(photoSize.location, photoSize.size, null, document, null, TYPE_SMALL, document.dc_id, null, photoSize.type); } public static ImageLocation getForLocal(TLRPC.FileLocation location) { @@ -215,7 +248,7 @@ public class ImageLocation { return imageLocation; } - private static ImageLocation getForPhoto(TLRPC.FileLocation location, int size, TLRPC.Photo photo, TLRPC.Document document, TLRPC.InputPeer photoPeer, boolean photoPeerBig, int dc_id, TLRPC.InputStickerSet stickerSet, String thumbSize) { + private static ImageLocation getForPhoto(TLRPC.FileLocation location, int size, TLRPC.Photo photo, TLRPC.Document document, TLRPC.InputPeer photoPeer, int photoPeerType, int dc_id, TLRPC.InputStickerSet stickerSet, String thumbSize) { if (location == null || photo == null && photoPeer == null && stickerSet == null && document == null) { return null; } @@ -224,7 +257,7 @@ public class ImageLocation { imageLocation.photo = photo; imageLocation.currentSize = size; imageLocation.photoPeer = photoPeer; - imageLocation.photoPeerBig = photoPeerBig; + imageLocation.photoPeerType = photoPeerType; imageLocation.stickerSet = stickerSet; if (location instanceof TLRPC.TL_fileLocationToBeDeprecated) { imageLocation.location = (TLRPC.TL_fileLocationToBeDeprecated) location; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ImageReceiver.java b/TMessagesProj/src/main/java/org/telegram/messenger/ImageReceiver.java index c5ce9f6db..bee51b37f 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ImageReceiver.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ImageReceiver.java @@ -313,6 +313,10 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg setImage(imageLocation, imageFilter, thumbLocation, thumbFilter, null, size, ext, parentObject, cacheType); } + public void setImage(ImageLocation fileLocation, String fileFilter, ImageLocation thumbLocation, String thumbFilter, Drawable thumb, Object parentObject, int cacheType) { + setImage(null, null, fileLocation, fileFilter, thumbLocation, thumbFilter, thumb, 0, null, parentObject, cacheType); + } + public void setImage(ImageLocation fileLocation, String fileFilter, ImageLocation thumbLocation, String thumbFilter, Drawable thumb, int size, String ext, Object parentObject, int cacheType) { setImage(null, null, fileLocation, fileFilter, thumbLocation, thumbFilter, thumb, size, ext, parentObject, cacheType); } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java b/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java index 3add96e88..c59af7456 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java @@ -65,7 +65,7 @@ public class LocaleController { public FastDateFormat formatterScheduleDay; public FastDateFormat formatterScheduleYear; public FastDateFormat formatterMonthYear; - public FastDateFormat[] formatterScheduleSend = new FastDateFormat[6]; + public FastDateFormat[] formatterScheduleSend = new FastDateFormat[15]; private HashMap allRules = new HashMap<>(); @@ -1087,7 +1087,53 @@ public class LocaleController { } } + private static char[] defaultNumbers = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; + private static char[][] otherNumbers = new char[][]{ + {'٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'}, + {'۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'}, + {'०', '१', '२', '३', '४', '५', '६', '७', '८', '९'}, + {'૦', '૧', '૨', '૩', '૪', '૫', '૬', '૭', '૮', '૯'}, + {'੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'}, + {'০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'}, + {'೦', '೧', '೨', '೩', '೪', '೫', '೬', '೭', '೮', '೯'}, + {'୦', '୧', '୨', '୩', '୪', '୫', '୬', '୭', '୮', '୯'}, + {'൦', '൧', '൨', '൩', '൪', '൫', '൬', '൭', '൮', '൯'}, + {'௦', '௧', '௨', '௩', '௪', '௫', '௬', '௭', '௮', '௯'}, + {'౦', '౧', '౨', '౩', '౪', '౫', '౬', '౭', '౮', '౯'}, + {'၀', '၁', '၂', '၃', '၄', '၅', '၆', '၇', '၈', '၉'}, + {'༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩'}, + {'᠐', '᠑', '᠒', '᠓', '᠔', '᠕', '᠖', '᠗', '᠘', '᠙'}, + {'០', '១', '២', '៣', '៤', '៥', '៦', '៧', '៨', '៩'}, + {'๐', '๑', '๒', '๓', '๔', '๕', '๖', '๗', '๘', '๙'}, + {'໐', '໑', '໒', '໓', '໔', '໕', '໖', '໗', '໘', '໙'}, + {'꧐', '꧑', '꧒', '꧓', '꧔', '꧕', '꧖', '꧗', '꧘', '꧙'} + }; + + public static String fixNumbers(CharSequence numbers) { + StringBuilder builder = new StringBuilder(numbers); + for (int c = 0, N = builder.length(); c < N; c++) { + char ch = builder.charAt(c); + if (ch >= '0' && ch <= '9' || ch == '.' || ch == ',') { + continue; + } + for (int a = 0; a < otherNumbers.length; a++) { + for (int b = 0; b < otherNumbers[a].length; b++) { + if (ch == otherNumbers[a][b]) { + builder.setCharAt(c, defaultNumbers[b]); + a = otherNumbers.length; + break; + } + } + } + } + return builder.toString(); + } + public String formatCurrencyString(long amount, String type) { + return formatCurrencyString(amount, true, type); + } + + public String formatCurrencyString(long amount, boolean fixAnything, String type) { type = type.toUpperCase(); String customFormat; double doubleAmount; @@ -1102,7 +1148,7 @@ public class LocaleController { case "IRR": doubleAmount = amount / 100.0f; - if (amount % 100 == 0) { + if (fixAnything && amount % 100 == 0) { customFormat = " %.0f"; } else { customFormat = " %.2f"; @@ -1158,7 +1204,7 @@ public class LocaleController { if (currency != null) { NumberFormat format = NumberFormat.getCurrencyInstance(currentLocale != null ? currentLocale : systemDefaultLocale); format.setCurrency(currency); - if (type.equals("IRR")) { + if (fixAnything && type.equals("IRR")) { format.setMaximumFractionDigits(0); } return (discount ? "-" : "") + format.format(doubleAmount); @@ -1166,6 +1212,46 @@ public class LocaleController { return (discount ? "-" : "") + String.format(Locale.US, type + customFormat, doubleAmount); } + public static int getCurrencyExpDivider(String type) { + switch (type) { + case "CLF": + return 10000; + case "BHD": + case "IQD": + case "JOD": + case "KWD": + case "LYD": + case "OMR": + case "TND": + return 1000; + case "BIF": + case "BYR": + case "CLP": + case "CVE": + case "DJF": + case "GNF": + case "ISK": + case "JPY": + case "KMF": + case "KRW": + case "MGA": + case "PYG": + case "RWF": + case "UGX": + case "UYI": + case "VND": + case "VUV": + case "XAF": + case "XOF": + case "XPF": + return 1; + case "MRO": + return 10; + default: + return 100; + } + } + public String formatCurrencyDecimalString(long amount, String type, boolean inludeType) { type = type.toUpperCase(); String customFormat; @@ -1559,12 +1645,57 @@ public class LocaleController { formatterScheduleSend[3] = createFormatter(locale, getStringInternal("RemindTodayAt", R.string.RemindTodayAt), "'Remind today at' HH:mm"); formatterScheduleSend[4] = createFormatter(locale, getStringInternal("RemindDayAt", R.string.RemindDayAt), "'Remind on' MMM d 'at' HH:mm"); formatterScheduleSend[5] = createFormatter(locale, getStringInternal("RemindDayYearAt", R.string.RemindDayYearAt), "'Remind on' MMM d yyyy 'at' HH:mm"); + formatterScheduleSend[6] = createFormatter(locale, getStringInternal("StartTodayAt", R.string.StartTodayAt), "'Start today at' HH:mm"); + formatterScheduleSend[7] = createFormatter(locale, getStringInternal("StartDayAt", R.string.StartDayAt), "'Start on' MMM d 'at' HH:mm"); + formatterScheduleSend[8] = createFormatter(locale, getStringInternal("StartDayYearAt", R.string.StartDayYearAt), "'Start on' MMM d yyyy 'at' HH:mm"); + formatterScheduleSend[9] = createFormatter(locale, getStringInternal("StartShortTodayAt", R.string.StartShortTodayAt), "'Today,' HH:mm"); + formatterScheduleSend[10] = createFormatter(locale, getStringInternal("StartShortDayAt", R.string.StartShortDayAt), "MMM d',' HH:mm"); + formatterScheduleSend[11] = createFormatter(locale, getStringInternal("StartShortDayYearAt", R.string.StartShortDayYearAt), "MMM d yyyy, HH:mm"); + formatterScheduleSend[12] = createFormatter(locale, getStringInternal("StartsTodayAt", R.string.StartsTodayAt), "'Starts today at' HH:mm"); + formatterScheduleSend[13] = createFormatter(locale, getStringInternal("StartsDayAt", R.string.StartsDayAt), "'Starts on' MMM d 'at' HH:mm"); + formatterScheduleSend[14] = createFormatter(locale, getStringInternal("StartsDayYearAt", R.string.StartsDayYearAt), "'Starts on' MMM d yyyy 'at' HH:mm"); } public static boolean isRTLCharacter(char ch) { return Character.getDirectionality(ch) == Character.DIRECTIONALITY_RIGHT_TO_LEFT || Character.getDirectionality(ch) == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC || Character.getDirectionality(ch) == Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING || Character.getDirectionality(ch) == Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE; } + public static String formatStartsTime(long date, int type) { + return formatStartsTime(date, type, true); + } + + public static String formatStartsTime(long date, int type, boolean needToday) { + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(System.currentTimeMillis()); + int currentYear = calendar.get(Calendar.YEAR); + int currentDay = calendar.get(Calendar.DAY_OF_YEAR); + + calendar.setTimeInMillis(date * 1000); + int selectedYear = calendar.get(Calendar.YEAR); + int selectedDay = calendar.get(Calendar.DAY_OF_YEAR); + + int num; + if (currentYear == selectedYear) { + if (needToday && selectedDay == currentDay) { + num = 0; + } else { + num = 1; + } + } else { + num = 2; + } + if (type == 1) { + num += 3; + } else if (type == 2) { + num += 6; + } else if (type == 3) { + num += 9; + } else if (type == 4) { + num += 12; + } + return LocaleController.getInstance().formatterScheduleSend[num].format(calendar.getTimeInMillis()); + } + public static String formatSectionDate(long date) { try { date *= 1000; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java index acd7aa99c..b7ebe4032 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java @@ -883,7 +883,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener, } proximitySensor = sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); PowerManager powerManager = (PowerManager) ApplicationLoader.applicationContext.getSystemService(Context.POWER_SERVICE); - proximityWakeLock = powerManager.newWakeLock(0x00000020, "proximity"); + proximityWakeLock = powerManager.newWakeLock(0x00000020, "telegram:proximity_lock"); } catch (Exception e) { FileLog.e(e); } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java index 4dfe444a5..f164f841e 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java @@ -144,6 +144,8 @@ public class MediaDataController extends BaseController { public static final int TYPE_FEATURED = 3; public static final int TYPE_EMOJI = 4; + public static final int TYPE_GREETINGS = 3; + private ArrayList[] stickerSets = new ArrayList[]{new ArrayList<>(), new ArrayList<>(), new ArrayList<>(0), new ArrayList<>(), new ArrayList<>()}; private LongSparseArray[] stickersByIds = new LongSparseArray[]{new LongSparseArray<>(), new LongSparseArray<>(), new LongSparseArray<>(), new LongSparseArray<>(), new LongSparseArray<>()}; private LongSparseArray stickerSetsById = new LongSparseArray<>(); @@ -168,9 +170,9 @@ public class MediaDataController extends BaseController { private HashMap> allStickers = new HashMap<>(); private HashMap> allStickersFeatured = new HashMap<>(); - private ArrayList[] recentStickers = new ArrayList[]{new ArrayList<>(), new ArrayList<>(), new ArrayList<>()}; - private boolean[] loadingRecentStickers = new boolean[3]; - private boolean[] recentStickersLoaded = new boolean[3]; + private ArrayList[] recentStickers = new ArrayList[]{new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>()}; + private boolean[] loadingRecentStickers = new boolean[4]; + private boolean[] recentStickersLoaded = new boolean[4]; private ArrayList recentGifs = new ArrayList<>(); private boolean loadingRecentGifs; @@ -185,8 +187,10 @@ public class MediaDataController extends BaseController { private boolean loadingFeaturedStickers; private boolean featuredStickersLoaded; + private TLRPC.Document greetingsSticker; + public void cleanup() { - for (int a = 0; a < 3; a++) { + for (int a = 0; a < recentStickers.length; a++) { recentStickers[a].clear(); loadingRecentStickers[a] = false; recentStickersLoaded[a] = false; @@ -283,7 +287,7 @@ public class MediaDataController extends BaseController { } public void addRecentSticker(final int type, Object parentObject, TLRPC.Document document, int date, boolean remove) { - if (!MessageObject.isStickerDocument(document) && !MessageObject.isAnimatedStickerDocument(document, true)) { + if (type == TYPE_GREETINGS || !MessageObject.isStickerDocument(document) && !MessageObject.isAnimatedStickerDocument(document, true)) { return; } boolean found = false; @@ -749,6 +753,8 @@ public class MediaDataController extends BaseController { cacheType = 3; } else if (type == TYPE_MASK) { cacheType = 4; + } else if (type == TYPE_GREETINGS) { + cacheType = 6; } else { cacheType = 5; } @@ -777,6 +783,9 @@ public class MediaDataController extends BaseController { loadingRecentStickers[type] = false; recentStickersLoaded[type] = true; } + if (type == TYPE_GREETINGS) { + preloadNextGreetingsSticker(); + } getNotificationCenter().postNotificationName(NotificationCenter.recentDocumentsDidLoad, gif, type); loadRecents(type, gif, false, false); }); @@ -794,6 +803,8 @@ public class MediaDataController extends BaseController { lastLoadTime = preferences.getLong("lastStickersLoadTime", 0); } else if (type == TYPE_MASK) { lastLoadTime = preferences.getLong("lastStickersLoadTimeMask", 0); + } else if (type == TYPE_GREETINGS) { + lastLoadTime = preferences.getLong("lastStickersLoadTimeGreet", 0); } else { lastLoadTime = preferences.getLong("lastStickersLoadTimeFavs", 0); } @@ -823,6 +834,11 @@ public class MediaDataController extends BaseController { TLRPC.TL_messages_getFavedStickers req = new TLRPC.TL_messages_getFavedStickers(); req.hash = calcDocumentsHash(recentStickers[type]); request = req; + } else if (type == TYPE_GREETINGS) { + TLRPC.TL_messages_getStickers req = new TLRPC.TL_messages_getStickers(); + req.emoticon = "\uD83D\uDC4B" + Emoji.fixEmoji("⭐"); + req.hash = calcDocumentsHash(recentStickers[type]); + request = req; } else { TLRPC.TL_messages_getRecentStickers req = new TLRPC.TL_messages_getRecentStickers(); req.hash = calcDocumentsHash(recentStickers[type]); @@ -831,7 +847,12 @@ public class MediaDataController extends BaseController { } getConnectionsManager().sendRequest(request, (response, error) -> { ArrayList arrayList = null; - if (type == TYPE_FAVE) { + if (type == TYPE_GREETINGS) { + if (response instanceof TLRPC.TL_messages_stickers) { + TLRPC.TL_messages_stickers res = (TLRPC.TL_messages_stickers) response; + arrayList = res.stickers; + } + } else if (type == TYPE_FAVE) { if (response instanceof TLRPC.TL_messages_favedStickers) { TLRPC.TL_messages_favedStickers res = (TLRPC.TL_messages_favedStickers) response; arrayList = res.stickers; @@ -842,12 +863,26 @@ public class MediaDataController extends BaseController { arrayList = res.stickers; } } - processLoadedRecentDocuments(type, arrayList, gif, 0, true); + processLoadedRecentDocuments(type, arrayList, false, 0, true); }); } } } + private void preloadNextGreetingsSticker() { + if (recentStickers[TYPE_GREETINGS].isEmpty()) { + return; + } + greetingsSticker = recentStickers[TYPE_GREETINGS].get(Utilities.random.nextInt(recentStickers[TYPE_GREETINGS].size())); + getFileLoader().loadFile(ImageLocation.getForDocument(greetingsSticker), greetingsSticker, null, 0, 1); + } + + public TLRPC.Document getGreetingsSticker() { + TLRPC.Document result = greetingsSticker; + preloadNextGreetingsSticker(); + return result; + } + protected void processLoadedRecentDocuments(final int type, final ArrayList documents, final boolean gif, final int date, boolean replace) { if (documents != null) { getMessagesStorage().getStorageQueue().postRunnable(() -> { @@ -857,7 +892,9 @@ public class MediaDataController extends BaseController { if (gif) { maxCount = getMessagesController().maxRecentGifsCount; } else { - if (type == TYPE_FAVE) { + if (type == TYPE_GREETINGS) { + maxCount = 200; + } else if (type == TYPE_FAVE) { maxCount = getMessagesController().maxFaveStickersCount; } else { maxCount = getMessagesController().maxRecentStickersCount; @@ -874,6 +911,8 @@ public class MediaDataController extends BaseController { cacheType = 3; } else if (type == TYPE_MASK) { cacheType = 4; + } else if (type == TYPE_GREETINGS) { + cacheType = 6; } else { cacheType = 5; } @@ -899,9 +938,7 @@ public class MediaDataController extends BaseController { document.serializeToStream(data); state.bindByteBuffer(10, data); state.step(); - if (data != null) { - data.reuse(); - } + data.reuse(); } state.dispose(); database.commitTransaction(); @@ -931,6 +968,8 @@ public class MediaDataController extends BaseController { editor.putLong("lastStickersLoadTime", System.currentTimeMillis()).commit(); } else if (type == TYPE_MASK) { editor.putLong("lastStickersLoadTimeMask", System.currentTimeMillis()).commit(); + } else if (type == TYPE_GREETINGS) { + editor.putLong("lastStickersLoadTimeGreet", System.currentTimeMillis()).commit(); } else { editor.putLong("lastStickersLoadTimeFavs", System.currentTimeMillis()).commit(); } @@ -941,6 +980,9 @@ public class MediaDataController extends BaseController { } else { recentStickers[type] = documents; } + if (type == TYPE_GREETINGS) { + preloadNextGreetingsSticker(); + } getNotificationCenter().postNotificationName(NotificationCenter.recentDocumentsDidLoad, gif, type); } else { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java index 5dcce812e..65cd9ca53 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java @@ -2424,7 +2424,10 @@ public class MessageObject { if (messageOwner instanceof TLRPC.TL_messageService) { if (messageOwner.action != null) { - if (messageOwner.action instanceof TLRPC.TL_messageActionGroupCall) { + if (messageOwner.action instanceof TLRPC.TL_messageActionGroupCallScheduled) { + TLRPC.TL_messageActionGroupCallScheduled action = (TLRPC.TL_messageActionGroupCallScheduled) messageOwner.action; + messageText = LocaleController.formatString("ActionGroupCallScheduled", R.string.ActionGroupCallScheduled, LocaleController.formatStartsTime(action.schedule_date, 3, false)); + } else if (messageOwner.action instanceof TLRPC.TL_messageActionGroupCall) { if (messageOwner.action.duration != 0) { String time; int days = messageOwner.action.duration / (3600 * 24); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java index 2850da41d..3f5acd008 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java @@ -313,9 +313,6 @@ public class MessagesController extends BaseController implements NotificationCe public volatile boolean ignoreSetOnline; - private ArrayList preloadedStickers = new ArrayList<>(); - private boolean preloadingSticker; - public static class FaqSearchResult { public String title; @@ -2390,7 +2387,7 @@ public class MessagesController extends BaseController implements NotificationCe editor = emojiPreferences.edit(); editor.putLong("lastGifLoadTime", 0).putLong("lastStickersLoadTime", 0).putLong("lastStickersLoadTimeMask", 0).putLong("lastStickersLoadTimeFavs", 0).commit(); editor = mainPreferences.edit(); - editor.remove("archivehint").remove("proximityhint").remove("archivehint_l").remove("gifhint").remove("soundHint").remove("dcDomainName2").remove("webFileDatacenterId").remove("themehint").remove("showFiltersTooltip").commit(); + editor.remove("archivehint").remove("proximityhint").remove("archivehint_l").remove("gifhint").remove("reminderhint").remove("soundHint").remove("dcDomainName2").remove("webFileDatacenterId").remove("themehint").remove("showFiltersTooltip").commit(); SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("shortcut_widget", Activity.MODE_PRIVATE); SharedPreferences.Editor widgetEditor = null; @@ -3006,6 +3003,9 @@ public class MessagesController extends BaseController implements NotificationCe })); } } + if (result != null && result.call instanceof TLRPC.TL_groupCallDiscarded) { + return null; + } return result; } @@ -8885,14 +8885,11 @@ public class MessagesController extends BaseController implements NotificationCe } public void updateChatAbout(int chat_id, final String about, final TLRPC.ChatFull info) { - if (info == null) { - return; - } TLRPC.TL_messages_editChatAbout req = new TLRPC.TL_messages_editChatAbout(); req.peer = getInputPeer(-chat_id); req.about = about; getConnectionsManager().sendRequest(req, (response, error) -> { - if (response instanceof TLRPC.TL_boolTrue) { + if (response instanceof TLRPC.TL_boolTrue && info != null) { AndroidUtilities.runOnUIThread(() -> { info.about = about; getMessagesStorage().updateChatInfo(info, false); @@ -9141,7 +9138,7 @@ public class MessagesController extends BaseController implements NotificationCe } } - public void changeChatAvatar(int chat_id, TLRPC.TL_inputChatPhoto oldPhoto, TLRPC.InputFile inputPhoto, final TLRPC.InputFile inputVideo, double videoStartTimestamp, String videoPath, TLRPC.FileLocation smallSize, TLRPC.FileLocation bigSize) { + public void changeChatAvatar(int chat_id, TLRPC.TL_inputChatPhoto oldPhoto, TLRPC.InputFile inputPhoto, final TLRPC.InputFile inputVideo, double videoStartTimestamp, String videoPath, TLRPC.FileLocation smallSize, TLRPC.FileLocation bigSize, Runnable callback) { TLObject request; TLRPC.InputChatPhoto inputChatPhoto; if (oldPhoto != null) { @@ -9221,7 +9218,12 @@ public class MessagesController extends BaseController implements NotificationCe } } processUpdates(updates, false); - AndroidUtilities.runOnUIThread(() -> getNotificationCenter().postNotificationName(NotificationCenter.updateInterfaces, MessagesController.UPDATE_MASK_AVATAR)); + AndroidUtilities.runOnUIThread(() -> { + if (callback != null) { + callback.run(); + } + getNotificationCenter().postNotificationName(NotificationCenter.updateInterfaces, MessagesController.UPDATE_MASK_AVATAR); + }); }, ConnectionsManager.RequestFlagInvokeAfter); } @@ -13977,7 +13979,7 @@ public class MessagesController extends BaseController implements NotificationCe } for (int a = 0, N = reasons.size(); a < N; a++) { TLRPC.TL_restrictionReason reason = reasons.get(a); - if ("all".equals(reason.platform) || "android".equals(reason.platform)) { + if ("all".equals(reason.platform) || !AndroidUtilities.isStandaloneApp() && !AndroidUtilities.isBetaApp() && "android".equals(reason.platform)) { return reason.text; } } @@ -14238,9 +14240,6 @@ public class MessagesController extends BaseController implements NotificationCe if (callback != null) { callback.onMessagesLoaded(isCache); } - if (lower_part > 0 && size == 0) { - preloadGreetingsSticker(); - } } } else if (id == NotificationCenter.loadingMessagesFailed && (Integer) args[0] == classGuid) { getNotificationCenter().removeObserver(this, NotificationCenter.messagesDidLoadWithoutProcess); @@ -14263,34 +14262,6 @@ public class MessagesController extends BaseController implements NotificationCe } } - public void preloadGreetingsSticker() { - if (preloadingSticker) { - return; - } - preloadingSticker = true; - TLRPC.TL_messages_getStickers req = new TLRPC.TL_messages_getStickers(); - req.emoticon = "\uD83D\uDC4B" + Emoji.fixEmoji("⭐"); - ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> { - if (response instanceof TLRPC.TL_messages_stickers) { - ArrayList list = ((TLRPC.TL_messages_stickers) response).stickers; - if (!list.isEmpty()) { - AndroidUtilities.runOnUIThread(() -> { - for (int i = 0; i < list.size(); i++) { - TLRPC.Document sticker = list.get(i); - FileLoader.getInstance(currentAccount).loadFile(ImageLocation.getForDocument(sticker), sticker, null, 0, 1); - preloadedStickers.add(sticker); - } - NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.greetingsStickerLoaded); - }); - } - } - }); - } - - public TLRPC.Document getPreloadedSticker() { - return !preloadedStickers.isEmpty() ? preloadedStickers.get(Utilities.random.nextInt(preloadedStickers.size())) : null; - } - public interface MessagesLoadedCallback { void onMessagesLoaded(boolean fromCache); void onError(); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java index 027d952bc..effd95114 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java @@ -6562,6 +6562,7 @@ public class MessagesStorage extends BaseController { } int minId = Integer.MAX_VALUE; int maxId = Integer.MIN_VALUE; + ArrayList messageIdsToFix = null; if (cursor != null) { while (cursor.next()) { messagesCount++; @@ -6572,7 +6573,14 @@ public class MessagesStorage extends BaseController { if (data != null) { TLRPC.Message message = TLRPC.Message.TLdeserialize(data, data.readInt32(false), false); message.send_state = cursor.intValue(2); - message.id = cursor.intValue(3); + long fullMid = cursor.longValue(3); + message.id = (int) fullMid; + if ((fullMid & 0xffffffff00000000L) == 0xffffffff00000000L && message.id > 0) { + if (messageIdsToFix == null) { + messageIdsToFix = new ArrayList<>(); + } + messageIdsToFix.add(fullMid); + } if (message.id > 0 && message.send_state != 0 && message.send_state != 3) { message.send_state = 0; } @@ -6678,6 +6686,18 @@ public class MessagesStorage extends BaseController { } cursor.dispose(); } + if (messageIdsToFix != null) { //TODO remove later + SQLitePreparedStatement state = database.executeFast("UPDATE messages SET mid = ? WHERE mid = ?"); + for (int a = 0, N = messageIdsToFix.size(); a < N; a++) { + long id = messageIdsToFix.get(a); + state.requery(); + state.bindLong(1, (int) id); + state.bindLong(2, id); + state.step(); + } + state.dispose(); + } + Collections.sort(res.messages, (lhs, rhs) -> { if (lhs.id > 0 && rhs.id > 0) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java b/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java index 80cba1486..03c91b1ad 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java @@ -22,7 +22,7 @@ import java.util.zip.ZipFile; public class NativeLoader { - private final static int LIB_VERSION = 37; + private final static int LIB_VERSION = 38; private final static String LIB_NAME = "tmessages." + LIB_VERSION; private final static String LIB_SO_NAME = "lib" + LIB_NAME + ".so"; private final static String LOCALE_LIB_SO_NAME = "lib" + LIB_NAME + "loc.so"; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/NotificationCenter.java b/TMessagesProj/src/main/java/org/telegram/messenger/NotificationCenter.java index 0327aa6f2..436821059 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/NotificationCenter.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/NotificationCenter.java @@ -213,7 +213,6 @@ public class NotificationCenter { public static final int webRtcMicAmplitudeEvent = totalEvents++; public static final int webRtcSpeakerAmplitudeEvent = totalEvents++; public static final int showBulletin = totalEvents++; - public static final int greetingsStickerLoaded = totalEvents++; private SparseArray> observers = new SparseArray<>(); private SparseArray> removeAfterBroadcast = new SparseArray<>(); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/NotificationsController.java b/TMessagesProj/src/main/java/org/telegram/messenger/NotificationsController.java index 036581e2a..dface0ef3 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/NotificationsController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/NotificationsController.java @@ -1404,6 +1404,8 @@ public class NotificationsController extends BaseController { } } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionGroupCall) { return LocaleController.formatString("NotificationGroupCreatedCall", R.string.NotificationGroupCreatedCall, name, chat.title); + } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionGroupCallScheduled) { + return messageObject.messageText.toString(); } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionInviteToGroupCall) { int singleUserId = messageObject.messageOwner.action.user_id; if (singleUserId == 0 && messageObject.messageOwner.action.users.size() == 1) { @@ -2023,6 +2025,8 @@ public class NotificationsController extends BaseController { } } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionGroupCall) { msg = LocaleController.formatString("NotificationGroupCreatedCall", R.string.NotificationGroupCreatedCall, name, chat.title); + } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionGroupCallScheduled) { + msg = messageObject.messageText.toString(); } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionInviteToGroupCall) { int singleUserId = messageObject.messageOwner.action.user_id; if (singleUserId == 0 && messageObject.messageOwner.action.users.size() == 1) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java b/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java index 28ba33868..cd34b18f6 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java @@ -42,6 +42,7 @@ import android.widget.Toast; import androidx.annotation.UiThread; import androidx.core.view.inputmethod.InputContentInfoCompat; +import org.json.JSONObject; import org.telegram.messenger.audioinfo.AudioInfo; import org.telegram.messenger.support.SparseLongArray; import org.telegram.tgnet.ConnectionsManager; @@ -1616,7 +1617,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe TLRPC.TL_keyboardButtonRow newRow = null; for (int c = 0, N2 = oldRow.buttons.size(); c < N2; c++) { TLRPC.KeyboardButton button = oldRow.buttons.get(c); - if (button instanceof TLRPC.TL_keyboardButtonUrlAuth || button instanceof TLRPC.TL_keyboardButtonUrl || button instanceof TLRPC.TL_keyboardButtonSwitchInline) { + if (button instanceof TLRPC.TL_keyboardButtonUrlAuth || button instanceof TLRPC.TL_keyboardButtonUrl || button instanceof TLRPC.TL_keyboardButtonSwitchInline || button instanceof TLRPC.TL_keyboardButtonBuy) { if (button instanceof TLRPC.TL_keyboardButtonUrlAuth) { TLRPC.TL_keyboardButtonUrlAuth auth = new TLRPC.TL_keyboardButtonUrlAuth(); auth.flags = button.flags; @@ -2541,9 +2542,9 @@ public class SendMessagesHelper extends BaseController implements NotificationCe if (response instanceof TLRPC.TL_payments_paymentForm) { final TLRPC.TL_payments_paymentForm form = (TLRPC.TL_payments_paymentForm) response; getMessagesController().putUsers(form.users, false); - parentFragment.presentFragment(new PaymentFormActivity(form, messageObject)); + parentFragment.presentFragment(new PaymentFormActivity(form, messageObject, parentFragment)); } else if (response instanceof TLRPC.TL_payments_paymentReceipt) { - parentFragment.presentFragment(new PaymentFormActivity(messageObject, (TLRPC.TL_payments_paymentReceipt) response)); + parentFragment.presentFragment(new PaymentFormActivity((TLRPC.TL_payments_paymentReceipt) response)); } } else { TLRPC.TL_messages_botCallbackAnswer res = (TLRPC.TL_messages_botCallbackAnswer) response; @@ -2730,10 +2731,26 @@ public class SendMessagesHelper extends BaseController implements NotificationCe if ((messageObject.messageOwner.media.flags & 4) == 0) { TLRPC.TL_payments_getPaymentForm req = new TLRPC.TL_payments_getPaymentForm(); req.msg_id = messageObject.getId(); + req.peer = getMessagesController().getInputPeer(messageObject.messageOwner.peer_id); + try { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("bg_color", Theme.getColor(Theme.key_windowBackgroundWhite)); + jsonObject.put("text_color", Theme.getColor(Theme.key_windowBackgroundWhiteBlackText)); + jsonObject.put("hint_color", Theme.getColor(Theme.key_windowBackgroundWhiteHintText)); + jsonObject.put("link_color", Theme.getColor(Theme.key_windowBackgroundWhiteLinkText)); + jsonObject.put("button_color", Theme.getColor(Theme.key_featuredStickers_addButton)); + jsonObject.put("button_text_color", Theme.getColor(Theme.key_featuredStickers_buttonText)); + req.theme_params = new TLRPC.TL_dataJSON(); + req.theme_params.data = jsonObject.toString(); + req.flags |= 1; + } catch (Exception e) { + FileLog.e(e); + } getConnectionsManager().sendRequest(req, requestDelegate, ConnectionsManager.RequestFlagFailOnServerErrors); } else { TLRPC.TL_payments_getPaymentReceipt req = new TLRPC.TL_payments_getPaymentReceipt(); req.msg_id = messageObject.messageOwner.media.receipt_msg_id; + req.peer = getMessagesController().getInputPeer(messageObject.messageOwner.peer_id); getConnectionsManager().sendRequest(req, requestDelegate, ConnectionsManager.RequestFlagFailOnServerErrors); } } else { @@ -2815,38 +2832,42 @@ public class SendMessagesHelper extends BaseController implements NotificationCe } public void sendMessage(MessageObject retryMessageObject) { - sendMessage(null, null, null, null, null, null, null, null, null, retryMessageObject.getDialogId(), retryMessageObject.messageOwner.attachPath, null, null, null, true, retryMessageObject, null, retryMessageObject.messageOwner.reply_markup, retryMessageObject.messageOwner.params, !retryMessageObject.messageOwner.silent, retryMessageObject.scheduled ? retryMessageObject.messageOwner.date : 0, 0, null); + sendMessage(null, null, null, null, null, null, null, null, null, null, retryMessageObject.getDialogId(), retryMessageObject.messageOwner.attachPath, null, null, null, true, retryMessageObject, null, retryMessageObject.messageOwner.reply_markup, retryMessageObject.messageOwner.params, !retryMessageObject.messageOwner.silent, retryMessageObject.scheduled ? retryMessageObject.messageOwner.date : 0, 0, null); } public void sendMessage(TLRPC.User user, long peer, MessageObject replyToMsg, MessageObject replyToTopMsg, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate) { - sendMessage(null, null, null, null, null, user, null, null, null, peer, null, replyToMsg, replyToTopMsg, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); + sendMessage(null, null, null, null, null, user, null, null, null, null, peer, null, replyToMsg, replyToTopMsg, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); + } + + public void sendMessage(TLRPC.TL_messageMediaInvoice invoice, long peer, MessageObject replyToMsg, MessageObject replyToTopMsg, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate) { + sendMessage(null, null, null, null, null, null, null, null, null, invoice, peer, null, replyToMsg, replyToTopMsg, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); } public void sendMessage(TLRPC.TL_document document, VideoEditedInfo videoEditedInfo, String path, long peer, MessageObject replyToMsg, MessageObject replyToTopMsg, String caption, ArrayList entities, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate, int ttl, Object parentObject) { - sendMessage(null, caption, null, null, videoEditedInfo, null, document, null, null, peer, path, replyToMsg, replyToTopMsg, null, true, null, entities, replyMarkup, params, notify, scheduleDate, ttl, parentObject); + sendMessage(null, caption, null, null, videoEditedInfo, null, document, null, null, null, peer, path, replyToMsg, replyToTopMsg, null, true, null, entities, replyMarkup, params, notify, scheduleDate, ttl, parentObject); } public void sendMessage(String message, long peer, MessageObject replyToMsg, MessageObject replyToTopMsg, TLRPC.WebPage webPage, boolean searchLinks, ArrayList entities, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate) { - sendMessage(message, null, null, null, null, null, null, null, null, peer, null, replyToMsg, replyToTopMsg, webPage, searchLinks, null, entities, replyMarkup, params, notify, scheduleDate, 0, null); + sendMessage(message, null, null, null, null, null, null, null, null, null, peer, null, replyToMsg, replyToTopMsg, webPage, searchLinks, null, entities, replyMarkup, params, notify, scheduleDate, 0, null); } public void sendMessage(TLRPC.MessageMedia location, long peer, MessageObject replyToMsg, MessageObject replyToTopMsg, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate) { - sendMessage(null, null, location, null, null, null, null, null, null, peer, null, replyToMsg, replyToTopMsg, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); + sendMessage(null, null, location, null, null, null, null, null, null, null, peer, null, replyToMsg, replyToTopMsg, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); } public void sendMessage(TLRPC.TL_messageMediaPoll poll, long peer, MessageObject replyToMsg, MessageObject replyToTopMsg, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate) { - sendMessage(null, null, null, null, null, null, null, null, poll, peer, null, replyToMsg, replyToTopMsg, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); + sendMessage(null, null, null, null, null, null, null, null, poll, null, peer, null, replyToMsg, replyToTopMsg, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); } public void sendMessage(TLRPC.TL_game game, long peer, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate) { - sendMessage(null, null, null, null, null, null, null, game, null, peer, null, null, null, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); + sendMessage(null, null, null, null, null, null, null, game, null, null, peer, null, null, null, null, true, null, null, replyMarkup, params, notify, scheduleDate, 0, null); } public void sendMessage(TLRPC.TL_photo photo, String path, long peer, MessageObject replyToMsg, MessageObject replyToTopMsg, String caption, ArrayList entities, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate, int ttl, Object parentObject) { - sendMessage(null, caption, null, photo, null, null, null, null, null, peer, path, replyToMsg, replyToTopMsg, null, true, null, entities, replyMarkup, params, notify, scheduleDate, ttl, parentObject); + sendMessage(null, caption, null, photo, null, null, null, null, null, null, peer, path, replyToMsg, replyToTopMsg, null, true, null, entities, replyMarkup, params, notify, scheduleDate, ttl, parentObject); } - private void sendMessage(String message, String caption, TLRPC.MessageMedia location, TLRPC.TL_photo photo, VideoEditedInfo videoEditedInfo, TLRPC.User user, TLRPC.TL_document document, TLRPC.TL_game game, TLRPC.TL_messageMediaPoll poll, long peer, String path, MessageObject replyToMsg, MessageObject replyToTopMsg, TLRPC.WebPage webPage, boolean searchLinks, MessageObject retryMessageObject, ArrayList entities, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate, int ttl, Object parentObject) { + private void sendMessage(String message, String caption, TLRPC.MessageMedia location, TLRPC.TL_photo photo, VideoEditedInfo videoEditedInfo, TLRPC.User user, TLRPC.TL_document document, TLRPC.TL_game game, TLRPC.TL_messageMediaPoll poll, TLRPC.TL_messageMediaInvoice invoice, long peer, String path, MessageObject replyToMsg, MessageObject replyToTopMsg, TLRPC.WebPage webPage, boolean searchLinks, MessageObject retryMessageObject, ArrayList entities, TLRPC.ReplyMarkup replyMarkup, HashMap params, boolean notify, int scheduleDate, int ttl, Object parentObject) { if (user != null && user.phone == null) { return; } @@ -3053,6 +3074,12 @@ public class SendMessagesHelper extends BaseController implements NotificationCe if (params != null && params.containsKey("query_id")) { type = 9; } + } else if (invoice != null) { + newMsg = new TLRPC.TL_message(); + newMsg.media = invoice; + if (params != null && params.containsKey("query_id")) { + type = 9; + } } else if (user != null) { if (encryptedChat != null) { newMsg = new TLRPC.TL_message_secret(); @@ -5040,7 +5067,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe newMsgObj.flags |= TLRPC.MESSAGE_FLAG_HAS_MEDIA; ImageLoader.saveMessageThumbs(newMsgObj); } - if (res.media instanceof TLRPC.TL_messageMediaGame && !TextUtils.isEmpty(res.message)) { + if ((res.media instanceof TLRPC.TL_messageMediaGame || res.media instanceof TLRPC.TL_messageMediaInvoice) && !TextUtils.isEmpty(res.message)) { newMsgObj.message = res.message; } if (!newMsgObj.entities.isEmpty()) { @@ -5207,7 +5234,6 @@ public class SendMessagesHelper extends BaseController implements NotificationCe getNotificationCenter().postNotificationName(NotificationCenter.messageReceivedByAck, msg_id); }); }, ConnectionsManager.RequestFlagCanCompress | ConnectionsManager.RequestFlagInvokeAfter | (req instanceof TLRPC.TL_messages_sendMessage ? ConnectionsManager.RequestFlagNeedQuickAck : 0)); - if (parentMessage != null) { parentMessage.sendDelayedRequests(); } @@ -5435,12 +5461,16 @@ public class SendMessagesHelper extends BaseController implements NotificationCe } else if (sentMessage.media instanceof TLRPC.TL_messageMediaGeo) { sentMessage.media.geo.lat = newMsg.media.geo.lat; sentMessage.media.geo._long = newMsg.media.geo._long; - } else if (sentMessage.media instanceof TLRPC.TL_messageMediaGame) { + } else if (sentMessage.media instanceof TLRPC.TL_messageMediaGame || sentMessage.media instanceof TLRPC.TL_messageMediaInvoice) { newMsg.media = sentMessage.media; - if (newMsg.media instanceof TLRPC.TL_messageMediaGame && !TextUtils.isEmpty(sentMessage.message)) { + if (!TextUtils.isEmpty(sentMessage.message)) { newMsg.entities = sentMessage.entities; newMsg.message = sentMessage.message; } + if (sentMessage.reply_markup != null) { + newMsg.reply_markup = sentMessage.reply_markup; + newMsg.flags |= TLRPC.MESSAGE_FLAG_HAS_MARKUP; + } } else if (sentMessage.media instanceof TLRPC.TL_messageMediaPoll) { newMsg.media = sentMessage.media; } @@ -6438,6 +6468,24 @@ public class SendMessagesHelper extends BaseController implements NotificationCe reason.reason = ""; user.restriction_reason.add(reason); accountInstance.getSendMessagesHelper().sendMessage(user, dialogId, replyToMsg, replyToTopMsg, result.send_message.reply_markup, params, notify, scheduleDate); + } else if (result.send_message instanceof TLRPC.TL_botInlineMessageMediaInvoice) { + if (DialogObject.isSecretDialogId(dialogId)) { + return; //doesn't work in secret chats for now + } + TLRPC.TL_botInlineMessageMediaInvoice invoice = (TLRPC.TL_botInlineMessageMediaInvoice) result.send_message; + TLRPC.TL_messageMediaInvoice messageMediaInvoice = new TLRPC.TL_messageMediaInvoice(); + messageMediaInvoice.shipping_address_requested = invoice.shipping_address_requested; + messageMediaInvoice.test = invoice.test; + messageMediaInvoice.title = invoice.title; + messageMediaInvoice.description = invoice.description; + if (invoice.photo != null) { + messageMediaInvoice.photo = invoice.photo; + messageMediaInvoice.flags |= 1; + } + messageMediaInvoice.currency = invoice.currency; + messageMediaInvoice.total_amount = invoice.total_amount; + messageMediaInvoice.start_param = ""; + accountInstance.getSendMessagesHelper().sendMessage(messageMediaInvoice, dialogId, replyToMsg, replyToTopMsg, result.send_message.reply_markup, params, notify, scheduleDate); } } @@ -7360,6 +7408,9 @@ public class SendMessagesHelper extends BaseController implements NotificationCe orientation[0] = fileDrawable.getOrientation(); } fileDrawable.recycle(); + if (bitmap == null) { + return createVideoThumbnailAtTime(filePath, time, orientation, false); + } } else { MediaMetadataRetriever retriever = new MediaMetadataRetriever(); try { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/SvgHelper.java b/TMessagesProj/src/main/java/org/telegram/messenger/SvgHelper.java index 87917f7e4..3cf989a84 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/SvgHelper.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/SvgHelper.java @@ -260,7 +260,11 @@ public class SvgHelper { placeholderMatrix = new Matrix(); placeholderGradient.setLocalMatrix(placeholderMatrix); for (Paint paint : paints.values()) { - paint.setShader(new ComposeShader(placeholderGradient, backgroundGradient, PorterDuff.Mode.ADD)); + if (Build.VERSION.SDK_INT <= 22) { + paint.setShader(backgroundGradient); + } else { + paint.setShader(new ComposeShader(placeholderGradient, backgroundGradient, PorterDuff.Mode.ADD)); + } } } } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/WearDataLayerListenerService.java b/TMessagesProj/src/main/java/org/telegram/messenger/WearDataLayerListenerService.java index 4f7ab88a5..6f9adebb6 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/WearDataLayerListenerService.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/WearDataLayerListenerService.java @@ -96,7 +96,7 @@ public class WearDataLayerListenerService extends WearableListenerService { }; AndroidUtilities.runOnUIThread(() -> { NotificationCenter.getInstance(currentAccount).addObserver(listener, NotificationCenter.fileDidLoad); - FileLoader.getInstance(currentAccount).loadFile(ImageLocation.getForUser(user, false), user, null, 1, 1); + FileLoader.getInstance(currentAccount).loadFile(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), user, null, 1, 1); }); try { barrier.await(10, TimeUnit.SECONDS); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPBaseService.java b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPBaseService.java index e3d56498e..fc8f5edde 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPBaseService.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPBaseService.java @@ -195,6 +195,7 @@ public abstract class VoIPBaseService extends Service implements SensorEventList protected int mySource; protected String myJson; protected boolean createGroupCall; + protected int scheduleDate; protected TLRPC.InputPeer groupCallPeer; public boolean hasFewPeers; protected String joinHash; @@ -1281,38 +1282,42 @@ public abstract class VoIPBaseService extends Service implements SensorEventList protected Bitmap getRoundAvatarBitmap(TLObject userOrChat) { Bitmap bitmap = null; - if (userOrChat instanceof TLRPC.User) { - TLRPC.User user = (TLRPC.User) userOrChat; - if (user.photo != null && user.photo.photo_small != null) { - BitmapDrawable img = ImageLoader.getInstance().getImageFromMemory(user.photo.photo_small, null, "50_50"); - if (img != null) { - bitmap = img.getBitmap().copy(Bitmap.Config.ARGB_8888, true); - } else { - try { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inMutable = true; - bitmap = BitmapFactory.decodeFile(FileLoader.getPathToAttach(user.photo.photo_small, true).toString(), opts); - } catch (Throwable e) { - FileLog.e(e); - } - } - } - } else { - TLRPC.Chat chat = (TLRPC.Chat) userOrChat; - if (chat.photo != null && chat.photo.photo_small != null) { - BitmapDrawable img = ImageLoader.getInstance().getImageFromMemory(chat.photo.photo_small, null, "50_50"); - if (img != null) { - bitmap = img.getBitmap().copy(Bitmap.Config.ARGB_8888, true); - } else { - try { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inMutable = true; - bitmap = BitmapFactory.decodeFile(FileLoader.getPathToAttach(chat.photo.photo_small, true).toString(), opts); - } catch (Throwable e) { - FileLog.e(e); + try { + if (userOrChat instanceof TLRPC.User) { + TLRPC.User user = (TLRPC.User) userOrChat; + if (user.photo != null && user.photo.photo_small != null) { + BitmapDrawable img = ImageLoader.getInstance().getImageFromMemory(user.photo.photo_small, null, "50_50"); + if (img != null) { + bitmap = img.getBitmap().copy(Bitmap.Config.ARGB_8888, true); + } else { + try { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inMutable = true; + bitmap = BitmapFactory.decodeFile(FileLoader.getPathToAttach(user.photo.photo_small, true).toString(), opts); + } catch (Throwable e) { + FileLog.e(e); + } + } + } + } else { + TLRPC.Chat chat = (TLRPC.Chat) userOrChat; + if (chat.photo != null && chat.photo.photo_small != null) { + BitmapDrawable img = ImageLoader.getInstance().getImageFromMemory(chat.photo.photo_small, null, "50_50"); + if (img != null) { + bitmap = img.getBitmap().copy(Bitmap.Config.ARGB_8888, true); + } else { + try { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inMutable = true; + bitmap = BitmapFactory.decodeFile(FileLoader.getPathToAttach(chat.photo.photo_small, true).toString(), opts); + } catch (Throwable e) { + FileLog.e(e); + } } } } + } catch (Throwable e) { + FileLog.e(e); } if (bitmap == null) { Theme.createDialogsResources(this); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java index f9b4b203d..bd26486d9 100755 --- a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java @@ -237,6 +237,7 @@ public class VoIPService extends VoIPBaseService { groupCallPeer.user_id = peerUserId; groupCallPeer.access_hash = intent.getLongExtra("peerAccessHash", 0); } + scheduleDate = intent.getIntExtra("scheduleDate", 0); isOutgoing = intent.getBooleanExtra("is_outgoing", false); videoCall = intent.getBooleanExtra("video_call", false); @@ -1328,6 +1329,10 @@ public class VoIPService extends VoIPBaseService { TLRPC.TL_phone_createGroupCall req = new TLRPC.TL_phone_createGroupCall(); req.peer = MessagesController.getInputPeer(chat); req.random_id = Utilities.random.nextInt(); + if (scheduleDate != 0) { + req.schedule_date = scheduleDate; + req.flags |= 2; + } ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> { if (response != null) { TLRPC.Updates updates = (TLRPC.Updates) response; @@ -1673,8 +1678,7 @@ public class VoIPService extends VoIPBaseService { connectingSoundRunnable = null; } } else { - Utilities.globalQueue.postRunnable(() -> soundPool.play(spVoiceChatStartId, 1.0f, 1.0f, 0, 0, 1)); - playedConnectedSound = true; + playConnectedSound(); } if (!wasConnected) { wasConnected = true; @@ -1866,6 +1870,11 @@ public class VoIPService extends VoIPBaseService { } } + public void playConnectedSound() { + Utilities.globalQueue.postRunnable(() -> soundPool.play(spVoiceChatStartId, 1.0f, 1.0f, 0, 0, 1)); + playedConnectedSound = true; + } + private void startConnectingSound() { Utilities.globalQueue.postRunnable(() -> { if (spPlayId != 0) { diff --git a/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java b/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java index 2893c40b0..1d3c0a9a6 100644 --- a/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java +++ b/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java @@ -376,8 +376,17 @@ public class ConnectionsManager extends BaseController { if (installer == null) { installer = ""; } + String packageId = ""; + try { + packageId = ApplicationLoader.applicationContext.getPackageName(); + } catch (Throwable ignore) { - native_init(currentAccount, version, layer, apiId, deviceModel, systemVersion, appVersion, langCode, systemLangCode, configPath, logPath, regId, cFingerprint, installer, timezoneOffset, userId, enablePushConnection, ApplicationLoader.isNetworkOnline(), ApplicationLoader.getCurrentNetworkType()); + } + if (packageId == null) { + packageId = ""; + } + + native_init(currentAccount, version, layer, apiId, deviceModel, systemVersion, appVersion, langCode, systemLangCode, configPath, logPath, regId, cFingerprint, installer, packageId, timezoneOffset, userId, enablePushConnection, ApplicationLoader.isNetworkOnline(), ApplicationLoader.getCurrentNetworkType()); checkConnection(); } @@ -688,7 +697,7 @@ public class ConnectionsManager extends BaseController { public static native void native_applyDatacenterAddress(int currentAccount, int datacenterId, String ipAddress, int port); public static native int native_getConnectionState(int currentAccount); public static native void native_setUserId(int currentAccount, int id); - public static native void native_init(int currentAccount, int version, int layer, int apiId, String deviceModel, String systemVersion, String appVersion, String langCode, String systemLangCode, String configPath, String logPath, String regId, String cFingerprint, String installer, int timezoneOffset, int userId, boolean enablePushConnection, boolean hasNetwork, int networkType); + public static native void native_init(int currentAccount, int version, int layer, int apiId, String deviceModel, String systemVersion, String appVersion, String langCode, String systemLangCode, String configPath, String logPath, String regId, String cFingerprint, String installer, String packageId, int timezoneOffset, int userId, boolean enablePushConnection, boolean hasNetwork, int networkType); public static native void native_setProxySettings(int currentAccount, String address, int port, String username, String password, String secret); public static native void native_setLangCode(int currentAccount, String langCode); public static native void native_setRegId(int currentAccount, String regId); diff --git a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java index 82cad21d8..7a20689c2 100644 --- a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java +++ b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java @@ -62,7 +62,7 @@ public class TLRPC { public static final int MESSAGE_FLAG_HAS_BOT_ID = 0x00000800; public static final int MESSAGE_FLAG_EDITED = 0x00008000; - public static final int LAYER = 126; + public static final int LAYER = 127; public static class TL_stats_megagroupStats extends TLObject { public static int constructor = 0xef7ff916; @@ -400,6 +400,7 @@ public class TLRPC { public boolean has_video; public FileLocation photo_small; public FileLocation photo_big; + public byte[] stripped_thumb; public int dc_id; public static ChatPhoto TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { @@ -415,6 +416,9 @@ public class TLRPC { result = new TL_chatPhoto_layer97(); break; case 0xd20b9f3c: + result = new TL_chatPhoto_layer126(); + break; + case 0x4790ee05: result = new TL_chatPhoto(); break; } @@ -471,7 +475,7 @@ public class TLRPC { } } - public static class TL_chatPhoto extends ChatPhoto { + public static class TL_chatPhoto_layer126 extends TL_chatPhoto { public static int constructor = 0xd20b9f3c; @@ -493,6 +497,34 @@ public class TLRPC { } } + public static class TL_chatPhoto extends ChatPhoto { + public static int constructor = 0x4790ee05; + + + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + has_video = (flags & 1) != 0; + photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception); + photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception); + if ((flags & 2) != 0) { + stripped_thumb = stream.readByteArray(exception); + } + dc_id = stream.readInt32(exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = has_video ? (flags | 1) : (flags &~ 1); + stream.writeInt32(flags); + photo_small.serializeToStream(stream); + photo_big.serializeToStream(stream); + if ((flags & 2) != 0) { + stream.writeByteArray(stripped_thumb); + } + stream.writeInt32(dc_id); + } + } + public static class TL_help_termsOfService extends TLObject { public static int constructor = 0x780a0310; @@ -559,90 +591,110 @@ public class TLRPC { } } - public static class TL_payments_paymentReceipt extends TLObject { - public static int constructor = 0x500911e1; + public static class TL_payments_paymentReceipt extends TLObject { + public static int constructor = 0x10b555d0; - public int flags; - public int date; - public int bot_id; - public TL_invoice invoice; - public int provider_id; - public TL_paymentRequestedInfo info; - public TL_shippingOption shipping; - public String currency; - public long total_amount; - public String credentials_title; - public ArrayList users = new ArrayList<>(); + public int flags; + public int date; + public int bot_id; + public int provider_id; + public String title; + public String description; + public WebDocument photo; + public TL_invoice invoice; + public TL_paymentRequestedInfo info; + public TL_shippingOption shipping; + public long tip_amount; + public String currency; + public long total_amount; + public String credentials_title; + public ArrayList users = new ArrayList<>(); - public static TL_payments_paymentReceipt TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { - if (TL_payments_paymentReceipt.constructor != constructor) { - if (exception) { - throw new RuntimeException(String.format("can't parse magic %x in TL_payments_paymentReceipt", constructor)); - } else { - return null; - } - } - TL_payments_paymentReceipt result = new TL_payments_paymentReceipt(); - result.readParams(stream, exception); - return result; - } + public static TL_payments_paymentReceipt TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { + if (TL_payments_paymentReceipt.constructor != constructor) { + if (exception) { + throw new RuntimeException(String.format("can't parse magic %x in TL_payments_paymentReceipt", constructor)); + } else { + return null; + } + } + TL_payments_paymentReceipt result = new TL_payments_paymentReceipt(); + result.readParams(stream, exception); + return result; + } - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - date = stream.readInt32(exception); - bot_id = stream.readInt32(exception); - invoice = TL_invoice.TLdeserialize(stream, stream.readInt32(exception), exception); - provider_id = stream.readInt32(exception); - if ((flags & 1) != 0) { - info = TL_paymentRequestedInfo.TLdeserialize(stream, stream.readInt32(exception), exception); - } - if ((flags & 2) != 0) { - shipping = TL_shippingOption.TLdeserialize(stream, stream.readInt32(exception), exception); - } - currency = stream.readString(exception); - total_amount = stream.readInt64(exception); - credentials_title = stream.readString(exception); - int magic = stream.readInt32(exception); - if (magic != 0x1cb5c415) { - if (exception) { - throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); - } - return; - } - int count = stream.readInt32(exception); - for (int a = 0; a < count; a++) { - User object = User.TLdeserialize(stream, stream.readInt32(exception), exception); - if (object == null) { - return; - } - users.add(object); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + date = stream.readInt32(exception); + bot_id = stream.readInt32(exception); + provider_id = stream.readInt32(exception); + title = stream.readString(exception); + description = stream.readString(exception); + if ((flags & 4) != 0) { + photo = WebDocument.TLdeserialize(stream, stream.readInt32(exception), exception); + } + invoice = TL_invoice.TLdeserialize(stream, stream.readInt32(exception), exception); + if ((flags & 1) != 0) { + info = TL_paymentRequestedInfo.TLdeserialize(stream, stream.readInt32(exception), exception); + } + if ((flags & 2) != 0) { + shipping = TL_shippingOption.TLdeserialize(stream, stream.readInt32(exception), exception); + } + if ((flags & 8) != 0) { + tip_amount = stream.readInt64(exception); + } + currency = stream.readString(exception); + total_amount = stream.readInt64(exception); + credentials_title = stream.readString(exception); + int magic = stream.readInt32(exception); + if (magic != 0x1cb5c415) { + if (exception) { + throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); + } + return; + } + int count = stream.readInt32(exception); + for (int a = 0; a < count; a++) { + User object = User.TLdeserialize(stream, stream.readInt32(exception), exception); + if (object == null) { + return; + } + users.add(object); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - stream.writeInt32(date); - stream.writeInt32(bot_id); - invoice.serializeToStream(stream); - stream.writeInt32(provider_id); - if ((flags & 1) != 0) { - info.serializeToStream(stream); - } - if ((flags & 2) != 0) { - shipping.serializeToStream(stream); - } - stream.writeString(currency); - stream.writeInt64(total_amount); - stream.writeString(credentials_title); - stream.writeInt32(0x1cb5c415); - int count = users.size(); - stream.writeInt32(count); - for (int a = 0; a < count; a++) { - users.get(a).serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + stream.writeInt32(date); + stream.writeInt32(bot_id); + stream.writeInt32(provider_id); + stream.writeString(title); + stream.writeString(description); + if ((flags & 4) != 0) { + photo.serializeToStream(stream); + } + invoice.serializeToStream(stream); + if ((flags & 1) != 0) { + info.serializeToStream(stream); + } + if ((flags & 2) != 0) { + shipping.serializeToStream(stream); + } + if ((flags & 8) != 0) { + stream.writeInt64(tip_amount); + } + stream.writeString(currency); + stream.writeInt64(total_amount); + stream.writeString(credentials_title); + stream.writeInt32(0x1cb5c415); + int count = users.size(); + stream.writeInt32(count); + for (int a = 0; a < count; a++) { + users.get(a).serializeToStream(stream); + } + } + } public static abstract class NotifyPeer extends TLObject { @@ -1876,15 +1928,17 @@ public class TLRPC { public boolean join_muted; public boolean can_change_join_muted; public boolean join_date_asc; + public boolean schedule_start_subscribed; public long id; public long access_hash; - public int duration; public int participants_count; public TL_dataJSON params; public String title; public int stream_dc_id; public int record_start_date; + public int schedule_date; public int version; + public int duration; public static GroupCall TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { GroupCall result = null; @@ -1892,7 +1946,7 @@ public class TLRPC { case 0x7780bcb4: result = new TL_groupCallDiscarded(); break; - case 0xc0c2052e: + case 0xc95c6654: result = new TL_groupCall(); break; } @@ -1925,7 +1979,7 @@ public class TLRPC { } public static class TL_groupCall extends GroupCall { - public static int constructor = 0xc0c2052e; + public static int constructor = 0xc95c6654; public void readParams(AbstractSerializedData stream, boolean exception) { @@ -1933,6 +1987,7 @@ public class TLRPC { join_muted = (flags & 2) != 0; can_change_join_muted = (flags & 4) != 0; join_date_asc = (flags & 64) != 0; + schedule_start_subscribed = (flags & 256) != 0; id = stream.readInt64(exception); access_hash = stream.readInt64(exception); participants_count = stream.readInt32(exception); @@ -1948,6 +2003,9 @@ public class TLRPC { if ((flags & 32) != 0) { record_start_date = stream.readInt32(exception); } + if ((flags & 128) != 0) { + schedule_date = stream.readInt32(exception); + } version = stream.readInt32(exception); } @@ -1956,6 +2014,7 @@ public class TLRPC { flags = join_muted ? (flags | 2) : (flags &~ 2); flags = can_change_join_muted ? (flags | 4) : (flags &~ 4); flags = join_date_asc ? (flags | 64) : (flags &~ 64); + flags = schedule_start_subscribed ? (flags | 256) : (flags &~ 256); stream.writeInt32(flags); stream.writeInt64(id); stream.writeInt64(access_hash); @@ -1972,6 +2031,9 @@ public class TLRPC { if ((flags & 32) != 0) { stream.writeInt32(record_start_date); } + if ((flags & 128) != 0) { + stream.writeInt32(schedule_date); + } stream.writeInt32(version); } } @@ -2873,101 +2935,104 @@ public class TLRPC { } } - public static class TL_payments_paymentForm extends TLObject { - public static int constructor = 0x3f56aea3; + public static class TL_payments_paymentForm extends TLObject { + public static int constructor = 0x8d0b2415; - public int flags; - public boolean can_save_credentials; - public boolean password_missing; - public int bot_id; - public TL_invoice invoice; - public int provider_id; - public String url; - public String native_provider; - public TL_dataJSON native_params; - public TL_paymentRequestedInfo saved_info; - public TL_paymentSavedCredentialsCard saved_credentials; - public ArrayList users = new ArrayList<>(); + public int flags; + public boolean can_save_credentials; + public boolean password_missing; + public long form_id; + public int bot_id; + public TL_invoice invoice; + public int provider_id; + public String url; + public String native_provider; + public TL_dataJSON native_params; + public TL_paymentRequestedInfo saved_info; + public TL_paymentSavedCredentialsCard saved_credentials; + public ArrayList users = new ArrayList<>(); - public static TL_payments_paymentForm TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { - if (TL_payments_paymentForm.constructor != constructor) { - if (exception) { - throw new RuntimeException(String.format("can't parse magic %x in TL_payments_paymentForm", constructor)); - } else { - return null; - } - } - TL_payments_paymentForm result = new TL_payments_paymentForm(); - result.readParams(stream, exception); - return result; - } + public static TL_payments_paymentForm TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { + if (TL_payments_paymentForm.constructor != constructor) { + if (exception) { + throw new RuntimeException(String.format("can't parse magic %x in TL_payments_paymentForm", constructor)); + } else { + return null; + } + } + TL_payments_paymentForm result = new TL_payments_paymentForm(); + result.readParams(stream, exception); + return result; + } - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - can_save_credentials = (flags & 4) != 0; - password_missing = (flags & 8) != 0; - bot_id = stream.readInt32(exception); - invoice = TL_invoice.TLdeserialize(stream, stream.readInt32(exception), exception); - provider_id = stream.readInt32(exception); - url = stream.readString(exception); - if ((flags & 16) != 0) { - native_provider = stream.readString(exception); - } - if ((flags & 16) != 0) { - native_params = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception); - } - if ((flags & 1) != 0) { - saved_info = TL_paymentRequestedInfo.TLdeserialize(stream, stream.readInt32(exception), exception); - } - if ((flags & 2) != 0) { - saved_credentials = TL_paymentSavedCredentialsCard.TLdeserialize(stream, stream.readInt32(exception), exception); - } - int magic = stream.readInt32(exception); - if (magic != 0x1cb5c415) { - if (exception) { - throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); - } - return; - } - int count = stream.readInt32(exception); - for (int a = 0; a < count; a++) { - User object = User.TLdeserialize(stream, stream.readInt32(exception), exception); - if (object == null) { - return; - } - users.add(object); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + can_save_credentials = (flags & 4) != 0; + password_missing = (flags & 8) != 0; + form_id = stream.readInt64(exception); + bot_id = stream.readInt32(exception); + invoice = TL_invoice.TLdeserialize(stream, stream.readInt32(exception), exception); + provider_id = stream.readInt32(exception); + url = stream.readString(exception); + if ((flags & 16) != 0) { + native_provider = stream.readString(exception); + } + if ((flags & 16) != 0) { + native_params = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception); + } + if ((flags & 1) != 0) { + saved_info = TL_paymentRequestedInfo.TLdeserialize(stream, stream.readInt32(exception), exception); + } + if ((flags & 2) != 0) { + saved_credentials = TL_paymentSavedCredentialsCard.TLdeserialize(stream, stream.readInt32(exception), exception); + } + int magic = stream.readInt32(exception); + if (magic != 0x1cb5c415) { + if (exception) { + throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); + } + return; + } + int count = stream.readInt32(exception); + for (int a = 0; a < count; a++) { + User object = User.TLdeserialize(stream, stream.readInt32(exception), exception); + if (object == null) { + return; + } + users.add(object); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - flags = can_save_credentials ? (flags | 4) : (flags &~ 4); - flags = password_missing ? (flags | 8) : (flags &~ 8); - stream.writeInt32(flags); - stream.writeInt32(bot_id); - invoice.serializeToStream(stream); - stream.writeInt32(provider_id); - stream.writeString(url); - if ((flags & 16) != 0) { - stream.writeString(native_provider); - } - if ((flags & 16) != 0) { - native_params.serializeToStream(stream); - } - if ((flags & 1) != 0) { - saved_info.serializeToStream(stream); - } - if ((flags & 2) != 0) { - saved_credentials.serializeToStream(stream); - } - stream.writeInt32(0x1cb5c415); - int count = users.size(); - stream.writeInt32(count); - for (int a = 0; a < count; a++) { - users.get(a).serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = can_save_credentials ? (flags | 4) : (flags &~ 4); + flags = password_missing ? (flags | 8) : (flags &~ 8); + stream.writeInt32(flags); + stream.writeInt64(form_id); + stream.writeInt32(bot_id); + invoice.serializeToStream(stream); + stream.writeInt32(provider_id); + stream.writeString(url); + if ((flags & 16) != 0) { + stream.writeString(native_provider); + } + if ((flags & 16) != 0) { + native_params.serializeToStream(stream); + } + if ((flags & 1) != 0) { + saved_info.serializeToStream(stream); + } + if ((flags & 2) != 0) { + saved_credentials.serializeToStream(stream); + } + stream.writeInt32(0x1cb5c415); + int count = users.size(); + stream.writeInt32(count); + for (int a = 0; a < count; a++) { + users.get(a).serializeToStream(stream); + } + } + } public static abstract class ContactLink_layer101 extends TLObject { @@ -13981,323 +14046,326 @@ public class TLRPC { } } - public static abstract class BotInlineMessage extends TLObject { - public int flags; - public GeoPoint geo; - public String title; - public String address; - public String provider; - public String venue_id; - public String venue_type; - public ReplyMarkup reply_markup; - public String message; - public ArrayList entities = new ArrayList<>(); - public String phone_number; - public String first_name; - public String last_name; - public String vcard; - public boolean no_webpage; - public int period; + public static abstract class BotInlineMessage extends TLObject { + public int flags; + public GeoPoint geo; + public String title; + public String address; + public String provider; + public String venue_id; + public String venue_type; + public ReplyMarkup reply_markup; + public String message; + public ArrayList entities = new ArrayList<>(); + public String phone_number; + public String first_name; + public String last_name; + public String vcard; + public boolean no_webpage; + public int period; public int heading; public int proximity_notification_radius; - public static BotInlineMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { - BotInlineMessage result = null; - switch (constructor) { - case 0x4366232e: - result = new TL_botInlineMessageMediaVenue_layer77(); - break; - case 0x8a86659c: - result = new TL_botInlineMessageMediaVenue(); - break; - case 0x3a8fd8b8: - result = new TL_botInlineMessageMediaGeo_layer71(); - break; - case 0x764cf810: - result = new TL_botInlineMessageMediaAuto(); - break; - case 0xa74b15b: - result = new TL_botInlineMessageMediaAuto_layer74(); - break; - case 0x35edb4d4: - result = new TL_botInlineMessageMediaContact_layer81(); - break; - case 0x18d1cdc2: - result = new TL_botInlineMessageMediaContact(); - break; - case 0x8c7f65e2: - result = new TL_botInlineMessageText(); - break; - case 0xb722de65: - result = new TL_botInlineMessageMediaGeo_layer119(); - break; + public static BotInlineMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { + BotInlineMessage result = null; + switch (constructor) { + case 0x4366232e: + result = new TL_botInlineMessageMediaVenue_layer77(); + break; + case 0x8a86659c: + result = new TL_botInlineMessageMediaVenue(); + break; + case 0x3a8fd8b8: + result = new TL_botInlineMessageMediaGeo_layer71(); + break; + case 0x764cf810: + result = new TL_botInlineMessageMediaAuto(); + break; + case 0xa74b15b: + result = new TL_botInlineMessageMediaAuto_layer74(); + break; + case 0x35edb4d4: + result = new TL_botInlineMessageMediaContact_layer81(); + break; + case 0x18d1cdc2: + result = new TL_botInlineMessageMediaContact(); + break; + case 0x8c7f65e2: + result = new TL_botInlineMessageText(); + break; + case 0xb722de65: + result = new TL_botInlineMessageMediaGeo_layer119(); + break; case 0x51846fd: result = new TL_botInlineMessageMediaGeo(); break; - } - if (result == null && exception) { - throw new RuntimeException(String.format("can't parse magic %x in BotInlineMessage", constructor)); - } - if (result != null) { - result.readParams(stream, exception); - } - return result; - } - } + case 0x354a9b09: + result = new TL_botInlineMessageMediaInvoice(); + break; + } + if (result == null && exception) { + throw new RuntimeException(String.format("can't parse magic %x in BotInlineMessage", constructor)); + } + if (result != null) { + result.readParams(stream, exception); + } + return result; + } + } - public static class TL_botInlineMessageMediaVenue_layer77 extends TL_botInlineMessageMediaVenue { - public static int constructor = 0x4366232e; + public static class TL_botInlineMessageMediaVenue_layer77 extends TL_botInlineMessageMediaVenue { + public static int constructor = 0x4366232e; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); - title = stream.readString(exception); - address = stream.readString(exception); - provider = stream.readString(exception); - venue_id = stream.readString(exception); - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); + title = stream.readString(exception); + address = stream.readString(exception); + provider = stream.readString(exception); + venue_id = stream.readString(exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - geo.serializeToStream(stream); - stream.writeString(title); - stream.writeString(address); - stream.writeString(provider); - stream.writeString(venue_id); - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + geo.serializeToStream(stream); + stream.writeString(title); + stream.writeString(address); + stream.writeString(provider); + stream.writeString(venue_id); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } - public static class TL_botInlineMessageMediaVenue extends BotInlineMessage { - public static int constructor = 0x8a86659c; + public static class TL_botInlineMessageMediaVenue extends BotInlineMessage { + public static int constructor = 0x8a86659c; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); - title = stream.readString(exception); - address = stream.readString(exception); - provider = stream.readString(exception); - venue_id = stream.readString(exception); - venue_type = stream.readString(exception); - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); + title = stream.readString(exception); + address = stream.readString(exception); + provider = stream.readString(exception); + venue_id = stream.readString(exception); + venue_type = stream.readString(exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - geo.serializeToStream(stream); - stream.writeString(title); - stream.writeString(address); - stream.writeString(provider); - stream.writeString(venue_id); - stream.writeString(venue_type); - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + geo.serializeToStream(stream); + stream.writeString(title); + stream.writeString(address); + stream.writeString(provider); + stream.writeString(venue_id); + stream.writeString(venue_type); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } - public static class TL_botInlineMessageMediaGeo_layer71 extends TL_botInlineMessageMediaGeo { - public static int constructor = 0x3a8fd8b8; + public static class TL_botInlineMessageMediaGeo_layer71 extends TL_botInlineMessageMediaGeo { + public static int constructor = 0x3a8fd8b8; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - geo.serializeToStream(stream); - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + geo.serializeToStream(stream); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } - public static class TL_botInlineMessageMediaAuto extends BotInlineMessage { - public static int constructor = 0x764cf810; + public static class TL_botInlineMessageMediaAuto extends BotInlineMessage { + public static int constructor = 0x764cf810; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - message = stream.readString(exception); - if ((flags & 2) != 0) { - int magic = stream.readInt32(exception); - if (magic != 0x1cb5c415) { - if (exception) { - throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); - } - return; - } - int count = stream.readInt32(exception); - for (int a = 0; a < count; a++) { - MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception); - if (object == null) { - return; - } - entities.add(object); - } - } - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + message = stream.readString(exception); + if ((flags & 2) != 0) { + int magic = stream.readInt32(exception); + if (magic != 0x1cb5c415) { + if (exception) { + throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); + } + return; + } + int count = stream.readInt32(exception); + for (int a = 0; a < count; a++) { + MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception); + if (object == null) { + return; + } + entities.add(object); + } + } + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - stream.writeString(message); - if ((flags & 2) != 0) { - stream.writeInt32(0x1cb5c415); - int count = entities.size(); - stream.writeInt32(count); - for (int a = 0; a < count; a++) { - entities.get(a).serializeToStream(stream); - } - } - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + stream.writeString(message); + if ((flags & 2) != 0) { + stream.writeInt32(0x1cb5c415); + int count = entities.size(); + stream.writeInt32(count); + for (int a = 0; a < count; a++) { + entities.get(a).serializeToStream(stream); + } + } + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } - public static class TL_botInlineMessageMediaAuto_layer74 extends TL_botInlineMessageMediaAuto { - public static int constructor = 0xa74b15b; + public static class TL_botInlineMessageMediaAuto_layer74 extends TL_botInlineMessageMediaAuto { + public static int constructor = 0xa74b15b; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - message = stream.readString(exception); - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + message = stream.readString(exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - stream.writeString(message); - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + stream.writeString(message); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } - public static class TL_botInlineMessageMediaContact_layer81 extends TL_botInlineMessageMediaContact { - public static int constructor = 0x35edb4d4; + public static class TL_botInlineMessageMediaContact_layer81 extends TL_botInlineMessageMediaContact { + public static int constructor = 0x35edb4d4; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - phone_number = stream.readString(exception); - first_name = stream.readString(exception); - last_name = stream.readString(exception); - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + phone_number = stream.readString(exception); + first_name = stream.readString(exception); + last_name = stream.readString(exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - stream.writeString(phone_number); - stream.writeString(first_name); - stream.writeString(last_name); - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + stream.writeString(phone_number); + stream.writeString(first_name); + stream.writeString(last_name); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } - public static class TL_botInlineMessageMediaContact extends BotInlineMessage { - public static int constructor = 0x18d1cdc2; + public static class TL_botInlineMessageMediaContact extends BotInlineMessage { + public static int constructor = 0x18d1cdc2; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - phone_number = stream.readString(exception); - first_name = stream.readString(exception); - last_name = stream.readString(exception); - vcard = stream.readString(exception); - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + phone_number = stream.readString(exception); + first_name = stream.readString(exception); + last_name = stream.readString(exception); + vcard = stream.readString(exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - stream.writeString(phone_number); - stream.writeString(first_name); - stream.writeString(last_name); - stream.writeString(vcard); - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + stream.writeString(phone_number); + stream.writeString(first_name); + stream.writeString(last_name); + stream.writeString(vcard); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } - public static class TL_botInlineMessageText extends BotInlineMessage { - public static int constructor = 0x8c7f65e2; + public static class TL_botInlineMessageText extends BotInlineMessage { + public static int constructor = 0x8c7f65e2; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - no_webpage = (flags & 1) != 0; - message = stream.readString(exception); - if ((flags & 2) != 0) { - int magic = stream.readInt32(exception); - if (magic != 0x1cb5c415) { - if (exception) { - throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); - } - return; - } - int count = stream.readInt32(exception); - for (int a = 0; a < count; a++) { - MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception); - if (object == null) { - return; - } - entities.add(object); - } - } - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + no_webpage = (flags & 1) != 0; + message = stream.readString(exception); + if ((flags & 2) != 0) { + int magic = stream.readInt32(exception); + if (magic != 0x1cb5c415) { + if (exception) { + throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); + } + return; + } + int count = stream.readInt32(exception); + for (int a = 0; a < count; a++) { + MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception); + if (object == null) { + return; + } + entities.add(object); + } + } + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - flags = no_webpage ? (flags | 1) : (flags &~ 1); - stream.writeInt32(flags); - stream.writeString(message); - if ((flags & 2) != 0) { - stream.writeInt32(0x1cb5c415); - int count = entities.size(); - stream.writeInt32(count); - for (int a = 0; a < count; a++) { - entities.get(a).serializeToStream(stream); - } - } - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = no_webpage ? (flags | 1) : (flags &~ 1); + stream.writeInt32(flags); + stream.writeString(message); + if ((flags & 2) != 0) { + stream.writeInt32(0x1cb5c415); + int count = entities.size(); + stream.writeInt32(count); + for (int a = 0; a < count; a++) { + entities.get(a).serializeToStream(stream); + } + } + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } public static class TL_botInlineMessageMediaGeo extends BotInlineMessage { public static int constructor = 0x51846fd; @@ -14339,29 +14407,73 @@ public class TLRPC { } } - public static class TL_botInlineMessageMediaGeo_layer119 extends TL_botInlineMessageMediaGeo { - public static int constructor = 0xb722de65; + public static class TL_botInlineMessageMediaGeo_layer119 extends TL_botInlineMessageMediaGeo { + public static int constructor = 0xb722de65; - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); - period = stream.readInt32(exception); - if ((flags & 4) != 0) { - reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception); + period = stream.readInt32(exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - geo.serializeToStream(stream); - stream.writeInt32(period); - if ((flags & 4) != 0) { - reply_markup.serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + geo.serializeToStream(stream); + stream.writeInt32(period); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } + + public static class TL_botInlineMessageMediaInvoice extends BotInlineMessage { + public static int constructor = 0x354a9b09; + + public boolean shipping_address_requested; + public boolean test; + public String description; + public WebDocument photo; + public String currency; + public long total_amount; + + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + shipping_address_requested = (flags & 2) != 0; + test = (flags & 8) != 0; + title = stream.readString(exception); + description = stream.readString(exception); + if ((flags & 1) != 0) { + photo = WebDocument.TLdeserialize(stream, stream.readInt32(exception), exception); + } + currency = stream.readString(exception); + total_amount = stream.readInt64(exception); + if ((flags & 4) != 0) { + reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception); + } + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = shipping_address_requested ? (flags | 2) : (flags &~ 2); + flags = test ? (flags | 8) : (flags &~ 8); + stream.writeInt32(flags); + stream.writeString(title); + stream.writeString(description); + if ((flags & 1) != 0) { + photo.serializeToStream(stream); + } + stream.writeString(currency); + stream.writeInt64(total_amount); + if ((flags & 4) != 0) { + reply_markup.serializeToStream(stream); + } + } + } public static class TL_keyboardButtonRow extends TLObject { public static int constructor = 0x77608b83; @@ -18367,6 +18479,9 @@ public class TLRPC { case 0x92a72876: result = new TL_messageActionGameScore(); break; + case 0xb3a07661: + result = new TL_messageActionGroupCallScheduled(); + break; } if (result == null && exception) { throw new RuntimeException(String.format("can't parse magic %x in MessageAction", constructor)); @@ -18896,6 +19011,23 @@ public class TLRPC { } } + public static class TL_messageActionGroupCallScheduled extends MessageAction { + public static int constructor = 0xb3a07661; + + public int schedule_date; + + public void readParams(AbstractSerializedData stream, boolean exception) { + call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception); + schedule_date = stream.readInt32(exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + call.serializeToStream(stream); + stream.writeInt32(schedule_date); + } + } + public static abstract class ReportReason extends TLObject { public static ReportReason TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { @@ -19411,82 +19543,111 @@ public class TLRPC { } } - public static class TL_invoice extends TLObject { - public static int constructor = 0xc30aa358; + public static class TL_invoice extends TLObject { + public static int constructor = 0xcd886e0; - public int flags; - public boolean test; - public boolean name_requested; - public boolean phone_requested; - public boolean email_requested; - public boolean shipping_address_requested; - public boolean flexible; - public boolean phone_to_provider; - public boolean email_to_provider; - public String currency; - public ArrayList prices = new ArrayList<>(); + public int flags; + public boolean test; + public boolean name_requested; + public boolean phone_requested; + public boolean email_requested; + public boolean shipping_address_requested; + public boolean flexible; + public boolean phone_to_provider; + public boolean email_to_provider; + public String currency; + public ArrayList prices = new ArrayList<>(); + public long max_tip_amount; + public ArrayList suggested_tip_amounts = new ArrayList<>(); - public static TL_invoice TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { - if (TL_invoice.constructor != constructor) { - if (exception) { - throw new RuntimeException(String.format("can't parse magic %x in TL_invoice", constructor)); - } else { - return null; - } - } - TL_invoice result = new TL_invoice(); - result.readParams(stream, exception); - return result; - } + public static TL_invoice TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { + if (TL_invoice.constructor != constructor) { + if (exception) { + throw new RuntimeException(String.format("can't parse magic %x in TL_invoice", constructor)); + } else { + return null; + } + } + TL_invoice result = new TL_invoice(); + result.readParams(stream, exception); + return result; + } - public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); - test = (flags & 1) != 0; - name_requested = (flags & 2) != 0; - phone_requested = (flags & 4) != 0; - email_requested = (flags & 8) != 0; - shipping_address_requested = (flags & 16) != 0; - flexible = (flags & 32) != 0; - phone_to_provider = (flags & 64) != 0; - email_to_provider = (flags & 128) != 0; - currency = stream.readString(exception); - int magic = stream.readInt32(exception); - if (magic != 0x1cb5c415) { - if (exception) { - throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); - } - return; - } - int count = stream.readInt32(exception); - for (int a = 0; a < count; a++) { - TL_labeledPrice object = TL_labeledPrice.TLdeserialize(stream, stream.readInt32(exception), exception); - if (object == null) { - return; - } - prices.add(object); - } - } + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + test = (flags & 1) != 0; + name_requested = (flags & 2) != 0; + phone_requested = (flags & 4) != 0; + email_requested = (flags & 8) != 0; + shipping_address_requested = (flags & 16) != 0; + flexible = (flags & 32) != 0; + phone_to_provider = (flags & 64) != 0; + email_to_provider = (flags & 128) != 0; + currency = stream.readString(exception); + int magic = stream.readInt32(exception); + if (magic != 0x1cb5c415) { + if (exception) { + throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); + } + return; + } + int count = stream.readInt32(exception); + for (int a = 0; a < count; a++) { + TL_labeledPrice object = TL_labeledPrice.TLdeserialize(stream, stream.readInt32(exception), exception); + if (object == null) { + return; + } + prices.add(object); + } + if ((flags & 256) != 0) { + max_tip_amount = stream.readInt64(exception); + } + if ((flags & 256) != 0) { + magic = stream.readInt32(exception); + if (magic != 0x1cb5c415) { + if (exception) { + throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); + } + return; + } + count = stream.readInt32(exception); + for (int a = 0; a < count; a++) { + suggested_tip_amounts.add(stream.readInt64(exception)); + } + } + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - flags = test ? (flags | 1) : (flags &~ 1); - flags = name_requested ? (flags | 2) : (flags &~ 2); - flags = phone_requested ? (flags | 4) : (flags &~ 4); - flags = email_requested ? (flags | 8) : (flags &~ 8); - flags = shipping_address_requested ? (flags | 16) : (flags &~ 16); - flags = flexible ? (flags | 32) : (flags &~ 32); - flags = phone_to_provider ? (flags | 64) : (flags &~ 64); - flags = email_to_provider ? (flags | 128) : (flags &~ 128); - stream.writeInt32(flags); - stream.writeString(currency); - stream.writeInt32(0x1cb5c415); - int count = prices.size(); - stream.writeInt32(count); - for (int a = 0; a < count; a++) { - prices.get(a).serializeToStream(stream); - } - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = test ? (flags | 1) : (flags &~ 1); + flags = name_requested ? (flags | 2) : (flags &~ 2); + flags = phone_requested ? (flags | 4) : (flags &~ 4); + flags = email_requested ? (flags | 8) : (flags &~ 8); + flags = shipping_address_requested ? (flags | 16) : (flags &~ 16); + flags = flexible ? (flags | 32) : (flags &~ 32); + flags = phone_to_provider ? (flags | 64) : (flags &~ 64); + flags = email_to_provider ? (flags | 128) : (flags &~ 128); + stream.writeInt32(flags); + stream.writeString(currency); + stream.writeInt32(0x1cb5c415); + int count = prices.size(); + stream.writeInt32(count); + for (int a = 0; a < count; a++) { + prices.get(a).serializeToStream(stream); + } + if ((flags & 256) != 0) { + stream.writeInt64(max_tip_amount); + } + if ((flags & 256) != 0) { + stream.writeInt32(0x1cb5c415); + count = suggested_tip_amounts.size(); + stream.writeInt32(count); + for (int a = 0; a < count; a++) { + stream.writeInt64(suggested_tip_amounts.get(a)); + } + } + } + } public static abstract class account_WallPapers extends TLObject { @@ -26695,13 +26856,14 @@ public class TLRPC { public long photo_id; public FileLocation photo_small; public FileLocation photo_big; + public byte[] stripped_thumb; public int dc_id; public static UserProfilePhoto TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { UserProfilePhoto result = null; switch (constructor) { case 0x69d3ab26: - result = new TL_userProfilePhoto(); + result = new TL_userProfilePhoto_layer126(); break; case 0xecd75d8c: result = new TL_userProfilePhoto_layer115(); @@ -26715,6 +26877,9 @@ public class TLRPC { case 0x990d1493: result = new TL_userProfilePhoto_old(); break; + case 0xcc656077: + result = new TL_userProfilePhoto(); + break; } if (result == null && exception) { throw new RuntimeException(String.format("can't parse magic %x in UserProfilePhoto", constructor)); @@ -26726,7 +26891,7 @@ public class TLRPC { } } - public static class TL_userProfilePhoto extends UserProfilePhoto { + public static class TL_userProfilePhoto_layer126 extends TL_userProfilePhoto { public static int constructor = 0x69d3ab26; @@ -26750,6 +26915,36 @@ public class TLRPC { } } + public static class TL_userProfilePhoto extends UserProfilePhoto { + public static int constructor = 0xcc656077; + + + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + has_video = (flags & 1) != 0; + photo_id = stream.readInt64(exception); + photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception); + photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception); + if ((flags & 2) != 0) { + stripped_thumb = stream.readByteArray(exception); + } + dc_id = stream.readInt32(exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = has_video ? (flags | 1) : (flags &~ 1); + stream.writeInt32(flags); + stream.writeInt64(photo_id); + photo_small.serializeToStream(stream); + photo_big.serializeToStream(stream); + if ((flags & 2) != 0) { + stream.writeByteArray(stripped_thumb); + } + stream.writeInt32(dc_id); + } + } + public static class TL_userProfilePhoto_layer115 extends TL_userProfilePhoto { public static int constructor = 0xecd75d8c; @@ -34359,6 +34554,7 @@ public class TLRPC { public int installed_date; public ArrayList thumbs = new ArrayList<>(); public int thumb_dc_id; + public int thumb_version; public static StickerSet TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) { StickerSet result = null; @@ -34376,11 +34572,14 @@ public class TLRPC { result = new TL_stickerSet_layer121(); break; case 0x40e237a8: - result = new TL_stickerSet(); + result = new TL_stickerSet_layer126(); break; case 0xcd303b41: result = new TL_stickerSet_layer75(); break; + case 0xd7df217a: + result = new TL_stickerSet(); + break; } if (result == null && exception) { throw new RuntimeException(String.format("can't parse magic %x in StickerSet", constructor)); @@ -34412,6 +34611,83 @@ public class TLRPC { } } + public static class TL_stickerSet extends StickerSet { + public static int constructor = 0xd7df217a; + + + public void readParams(AbstractSerializedData stream, boolean exception) { + flags = stream.readInt32(exception); + archived = (flags & 2) != 0; + official = (flags & 4) != 0; + masks = (flags & 8) != 0; + animated = (flags & 32) != 0; + if ((flags & 1) != 0) { + installed_date = stream.readInt32(exception); + } + id = stream.readInt64(exception); + access_hash = stream.readInt64(exception); + title = stream.readString(exception); + short_name = stream.readString(exception); + if ((flags & 16) != 0) { + int magic = stream.readInt32(exception); + if (magic != 0x1cb5c415) { + if (exception) { + throw new RuntimeException(String.format("wrong Vector magic, got %x", magic)); + } + return; + } + int count = stream.readInt32(exception); + for (int a = 0; a < count; a++) { + PhotoSize object = PhotoSize.TLdeserialize(stream, stream.readInt32(exception), exception); + if (object == null) { + return; + } + thumbs.add(object); + } + } + if ((flags & 16) != 0) { + thumb_dc_id = stream.readInt32(exception); + } + if ((flags & 16) != 0) { + thumb_version = stream.readInt32(exception); + } + count = stream.readInt32(exception); + hash = stream.readInt32(exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = archived ? (flags | 2) : (flags &~ 2); + flags = official ? (flags | 4) : (flags &~ 4); + flags = masks ? (flags | 8) : (flags &~ 8); + flags = animated ? (flags | 32) : (flags &~ 32); + stream.writeInt32(flags); + if ((flags & 1) != 0) { + stream.writeInt32(installed_date); + } + stream.writeInt64(id); + stream.writeInt64(access_hash); + stream.writeString(title); + stream.writeString(short_name); + if ((flags & 16) != 0) { + stream.writeInt32(0x1cb5c415); + int count = thumbs.size(); + stream.writeInt32(count); + for (int a = 0; a < count; a++) { + thumbs.get(a).serializeToStream(stream); + } + } + if ((flags & 16) != 0) { + stream.writeInt32(thumb_dc_id); + } + if ((flags & 16) != 0) { + stream.writeInt32(thumb_version); + } + stream.writeInt32(count); + stream.writeInt32(hash); + } + } + public static class TL_stickerSet_layer96 extends TL_stickerSet { public static int constructor = 0x5585a139; @@ -34497,7 +34773,7 @@ public class TLRPC { } } - public static class TL_stickerSet extends StickerSet { + public static class TL_stickerSet_layer126 extends TL_stickerSet { public static int constructor = 0x40e237a8; @@ -38310,7 +38586,7 @@ public class TLRPC { } public static class TL_groupCallParticipant extends TLObject { - public static int constructor = 0x19adba89; + public static int constructor = 0xb96b25ee; public int flags; public boolean muted; @@ -38329,6 +38605,7 @@ public class TLRPC { public int volume; public String about; public long raise_hand_rating; + public TL_dataJSON params; public long lastSpeakTime; //custom; public float amplitude; //custom; public boolean hasVoice; //custom; @@ -38378,6 +38655,9 @@ public class TLRPC { if ((flags & 8192) != 0) { raise_hand_rating = stream.readInt64(exception); } + if ((flags & 64) != 0) { + params = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception); + } } public void serializeToStream(AbstractSerializedData stream) { @@ -38407,6 +38687,9 @@ public class TLRPC { if ((flags & 8192) != 0) { stream.writeInt64(raise_hand_rating); } + if ((flags & 64) != 0) { + params.serializeToStream(stream); + } } } @@ -45165,10 +45448,13 @@ public class TLRPC { } public static class TL_phone_createGroupCall extends TLObject { - public static int constructor = 0xbd3dabe0; + public static int constructor = 0x48cdc6d8; + public int flags; public InputPeer peer; public int random_id; + public String title; + public int schedule_date; public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { return Updates.TLdeserialize(stream, constructor, exception); @@ -45176,8 +45462,15 @@ public class TLRPC { public void serializeToStream(AbstractSerializedData stream) { stream.writeInt32(constructor); + stream.writeInt32(flags); peer.serializeToStream(stream); stream.writeInt32(random_id); + if ((flags & 1) != 0) { + stream.writeString(title); + } + if ((flags & 2) != 0) { + stream.writeInt32(schedule_date); + } } } @@ -45453,35 +45746,152 @@ public class TLRPC { } } - public static class TL_payments_getPaymentForm extends TLObject { - public static int constructor = 0x99f09745; + public static class TL_phone_toggleGroupCallStartSubscription extends TLObject { + public static int constructor = 0x219c34e6; - public int msg_id; + public TL_inputGroupCall call; + public boolean subscribed; - public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { - return TL_payments_paymentForm.TLdeserialize(stream, constructor, exception); - } + public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { + return Updates.TLdeserialize(stream, constructor, exception); + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(msg_id); - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + call.serializeToStream(stream); + stream.writeBool(subscribed); + } + } - public static class TL_payments_getPaymentReceipt extends TLObject { - public static int constructor = 0xa092a980; + public static class TL_phone_startScheduledGroupCall extends TLObject { + public static int constructor = 0x5680e342; - public int msg_id; + public TL_inputGroupCall call; - public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { - return TL_payments_paymentReceipt.TLdeserialize(stream, constructor, exception); - } + public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { + return Updates.TLdeserialize(stream, constructor, exception); + } - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(msg_id); - } - } + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + call.serializeToStream(stream); + } + } + + public static class TL_phone_saveDefaultGroupCallJoinAs extends TLObject { + public static int constructor = 0x575e1f8c; + + public InputPeer peer; + public InputPeer join_as; + + public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { + return Bool.TLdeserialize(stream, constructor, exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + peer.serializeToStream(stream); + join_as.serializeToStream(stream); + } + } + + public static class TL_payments_getPaymentForm extends TLObject { + public static int constructor = 0x8a333c8d; + + public int flags; + public InputPeer peer; + public int msg_id; + public TL_dataJSON theme_params; + + public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { + return TL_payments_paymentForm.TLdeserialize(stream, constructor, exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + peer.serializeToStream(stream); + stream.writeInt32(msg_id); + if ((flags & 1) != 0) { + theme_params.serializeToStream(stream); + } + } + } + + public static class TL_payments_getPaymentReceipt extends TLObject { + public static int constructor = 0x2478d1cc; + + public InputPeer peer; + public int msg_id; + + public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { + return TL_payments_paymentReceipt.TLdeserialize(stream, constructor, exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + peer.serializeToStream(stream); + stream.writeInt32(msg_id); + } + } + + public static class TL_payments_validateRequestedInfo extends TLObject { + public static int constructor = 0xdb103170; + + public int flags; + public boolean save; + public InputPeer peer; + public int msg_id; + public TL_paymentRequestedInfo info; + + public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { + return TL_payments_validatedRequestedInfo.TLdeserialize(stream, constructor, exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + flags = save ? (flags | 1) : (flags &~ 1); + stream.writeInt32(flags); + peer.serializeToStream(stream); + stream.writeInt32(msg_id); + info.serializeToStream(stream); + } + } + + public static class TL_payments_sendPaymentForm extends TLObject { + public static int constructor = 0x30c3bc9d; + + public int flags; + public long form_id; + public InputPeer peer; + public int msg_id; + public String requested_info_id; + public String shipping_option_id; + public InputPaymentCredentials credentials; + public long tip_amount; + + public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { + return payments_PaymentResult.TLdeserialize(stream, constructor, exception); + } + + public void serializeToStream(AbstractSerializedData stream) { + stream.writeInt32(constructor); + stream.writeInt32(flags); + stream.writeInt64(form_id); + peer.serializeToStream(stream); + stream.writeInt32(msg_id); + if ((flags & 1) != 0) { + stream.writeString(requested_info_id); + } + if ((flags & 2) != 0) { + stream.writeString(shipping_option_id); + } + credentials.serializeToStream(stream); + if ((flags & 4) != 0) { + stream.writeInt64(tip_amount); + } + } + } public static class TL_help_supportName extends TLObject { public static int constructor = 0x8c05f1c9; @@ -45573,54 +45983,6 @@ public class TLRPC { } } - public static class TL_payments_validateRequestedInfo extends TLObject { - public static int constructor = 0x770a8e74; - - public int flags; - public boolean save; - public int msg_id; - public TL_paymentRequestedInfo info; - - public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { - return TL_payments_validatedRequestedInfo.TLdeserialize(stream, constructor, exception); - } - - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - flags = save ? (flags | 1) : (flags &~ 1); - stream.writeInt32(flags); - stream.writeInt32(msg_id); - info.serializeToStream(stream); - } - } - - public static class TL_payments_sendPaymentForm extends TLObject { - public static int constructor = 0x2b8879b3; - - public int flags; - public int msg_id; - public String requested_info_id; - public String shipping_option_id; - public InputPaymentCredentials credentials; - - public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) { - return payments_PaymentResult.TLdeserialize(stream, constructor, exception); - } - - public void serializeToStream(AbstractSerializedData stream) { - stream.writeInt32(constructor); - stream.writeInt32(flags); - stream.writeInt32(msg_id); - if ((flags & 1) != 0) { - stream.writeString(requested_info_id); - } - if ((flags & 2) != 0) { - stream.writeString(shipping_option_id); - } - credentials.serializeToStream(stream); - } - } - public static class TL_payments_getSavedInfo extends TLObject { public static int constructor = 0x227d824b; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java index 463588649..d8c9627de 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java @@ -353,6 +353,11 @@ public class ActionBarLayout extends FrameLayout { public void setInnerTranslationX(float value) { innerTranslationX = value; invalidate(); + + if (fragmentsStack.size() >= 2) { + BaseFragment prevFragment = fragmentsStack.get(fragmentsStack.size() - 2); + prevFragment.onSlideProgress(false, value / containerView.getMeasuredWidth()); + } } @Keep @@ -528,9 +533,11 @@ public class ActionBarLayout extends FrameLayout { return; } BaseFragment lastFragment = fragmentsStack.get(fragmentsStack.size() - 1); + lastFragment.prepareFragmentToSlide(true, false); lastFragment.onPause(); lastFragment.onFragmentDestroy(); lastFragment.setParentLayout(null); + fragmentsStack.remove(fragmentsStack.size() - 1); LayoutContainer temp = containerView; @@ -542,11 +549,16 @@ public class ActionBarLayout extends FrameLayout { currentActionBar = lastFragment.actionBar; lastFragment.onResume(); lastFragment.onBecomeFullyVisible(); + lastFragment.prepareFragmentToSlide(false, false); layoutToIgnore = containerView; } else { if (fragmentsStack.size() >= 2) { - BaseFragment lastFragment = fragmentsStack.get(fragmentsStack.size() - 2); + BaseFragment lastFragment = fragmentsStack.get(fragmentsStack.size() - 1); + lastFragment.prepareFragmentToSlide(true, false); + + lastFragment = fragmentsStack.get(fragmentsStack.size() - 2); + lastFragment.prepareFragmentToSlide(false, false); lastFragment.onPause(); if (lastFragment.fragmentView != null) { ViewGroup parent = (ViewGroup) lastFragment.fragmentView.getParent(); @@ -614,6 +626,10 @@ public class ActionBarLayout extends FrameLayout { if (themeAnimatorSet != null) { presentingFragmentDescriptions = lastFragment.getThemeDescriptions(); } + + BaseFragment currentFragment = fragmentsStack.get(fragmentsStack.size() - 1); + currentFragment.prepareFragmentToSlide(true, true); + lastFragment.prepareFragmentToSlide(false, true); } public boolean onTouchEvent(MotionEvent ev) { @@ -685,19 +701,33 @@ public class ActionBarLayout extends FrameLayout { float distToMove; if (!backAnimation) { distToMove = containerView.getMeasuredWidth() - x; + int duration = Math.max((int) (200.0f / containerView.getMeasuredWidth() * distToMove), 50); animatorSet.playTogether( - ObjectAnimator.ofFloat(containerView, View.TRANSLATION_X, containerView.getMeasuredWidth()), - ObjectAnimator.ofFloat(this, "innerTranslationX", (float) containerView.getMeasuredWidth()) + ObjectAnimator.ofFloat(containerView, View.TRANSLATION_X, containerView.getMeasuredWidth()).setDuration(duration), + ObjectAnimator.ofFloat(this, "innerTranslationX", (float) containerView.getMeasuredWidth()).setDuration(duration) ); } else { distToMove = x; + int duration = Math.max((int) (200.0f / containerView.getMeasuredWidth() * distToMove), 50); animatorSet.playTogether( - ObjectAnimator.ofFloat(containerView, View.TRANSLATION_X, 0), - ObjectAnimator.ofFloat(this, "innerTranslationX", 0.0f) + ObjectAnimator.ofFloat(containerView, View.TRANSLATION_X, 0).setDuration(duration), + ObjectAnimator.ofFloat(this, "innerTranslationX", 0.0f).setDuration(duration) ); } - animatorSet.setDuration(Math.max((int) (200.0f / containerView.getMeasuredWidth() * distToMove), 50)); + Animator customTransition = currentFragment.getCustomSlideTransition(false, backAnimation, distToMove); + if (customTransition != null) { + animatorSet.playTogether(customTransition); + } + + BaseFragment lastFragment = fragmentsStack.get(fragmentsStack.size() - 2); + if (lastFragment != null) { + customTransition = lastFragment.getCustomSlideTransition(false, backAnimation, distToMove); + if (customTransition != null) { + animatorSet.playTogether(customTransition); + } + } + animatorSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animator) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java index 90da7b0fc..d3b548c6e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java @@ -17,7 +17,6 @@ import android.widget.LinearLayout; import org.telegram.messenger.AndroidUtilities; import org.telegram.ui.Adapters.FiltersView; import org.telegram.ui.Components.RLottieDrawable; -import org.telegram.ui.Components.RLottieImageView; public class ActionBarMenu extends LinearLayout { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenuItem.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenuItem.java index 7798d4de2..15018c518 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenuItem.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenuItem.java @@ -1685,12 +1685,12 @@ public class ActionBarMenuItem extends FrameLayout { avatarImageView.setImageDrawable(combinedDrawable); } else { avatarImageView.getImageReceiver().setRoundRadius(AndroidUtilities.dp(16)); - avatarImageView.getImageReceiver().setImage(ImageLocation.getForUser(user, false), "50_50", thumbDrawable, null, user, 0); + avatarImageView.getImageReceiver().setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", thumbDrawable, user, 0); } } else if (data.chat instanceof TLRPC.Chat) { TLRPC.Chat chat = (TLRPC.Chat) data.chat; avatarImageView.getImageReceiver().setRoundRadius(AndroidUtilities.dp(16)); - avatarImageView.getImageReceiver().setImage(ImageLocation.getForChat(chat, false), "50_50",thumbDrawable, null, chat, 0); + avatarImageView.getImageReceiver().setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", thumbDrawable, chat, 0); } } else if (data.filterType == FiltersView.FILTER_TYPE_ARCHIVE) { CombinedDrawable combinedDrawable = Theme.createCircleDrawableWithIcon(AndroidUtilities.dp(32), R.drawable.chats_archive); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/AlertDialog.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/AlertDialog.java index f4d4b70f5..7775c20fc 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/AlertDialog.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/AlertDialog.java @@ -68,6 +68,8 @@ public class AlertDialog extends Dialog implements Drawable.Callback { private AnimatorSet[] shadowAnimation = new AnimatorSet[2]; private int customViewOffset = 20; + private String dialogButtonColorKey = Theme.key_dialogButton; + private OnCancelListener onCancelListener; private AlertDialog cancelDialog; @@ -728,13 +730,13 @@ public class AlertDialog extends Dialog implements Drawable.Callback { textView.setMinWidth(AndroidUtilities.dp(64)); textView.setTag(Dialog.BUTTON_POSITIVE); textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); - textView.setTextColor(getThemeColor(Theme.key_dialogButton)); + textView.setTextColor(getThemeColor(dialogButtonColorKey)); textView.setGravity(Gravity.CENTER); textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); // textView.setLines(1); // textView.setSingleLine(true); //TODO textView.setText(positiveButtonText.toString().toUpperCase()); - textView.setBackgroundDrawable(Theme.getRoundRectSelectorDrawable(getThemeColor(Theme.key_dialogButton))); + textView.setBackgroundDrawable(Theme.getRoundRectSelectorDrawable(getThemeColor(dialogButtonColorKey))); textView.setPadding(AndroidUtilities.dp(10), 0, AndroidUtilities.dp(10), 0); if (verticalButtons) { buttonsLayout.addView(textView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, 36, LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT)); @@ -768,13 +770,13 @@ public class AlertDialog extends Dialog implements Drawable.Callback { textView.setMinWidth(AndroidUtilities.dp(64)); textView.setTag(Dialog.BUTTON_NEGATIVE); textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); - textView.setTextColor(getThemeColor(Theme.key_dialogButton)); + textView.setTextColor(getThemeColor(dialogButtonColorKey)); textView.setGravity(Gravity.CENTER); textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); textView.setEllipsize(TextUtils.TruncateAt.END); textView.setSingleLine(true); textView.setText(negativeButtonText.toString().toUpperCase()); - textView.setBackgroundDrawable(Theme.getRoundRectSelectorDrawable(getThemeColor(Theme.key_dialogButton))); + textView.setBackgroundDrawable(Theme.getRoundRectSelectorDrawable(getThemeColor(dialogButtonColorKey))); textView.setPadding(AndroidUtilities.dp(10), 0, AndroidUtilities.dp(10), 0); if (verticalButtons) { buttonsLayout.addView(textView, 0, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, 36, LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT)); @@ -808,13 +810,13 @@ public class AlertDialog extends Dialog implements Drawable.Callback { textView.setMinWidth(AndroidUtilities.dp(64)); textView.setTag(Dialog.BUTTON_NEUTRAL); textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); - textView.setTextColor(getThemeColor(Theme.key_dialogButton)); + textView.setTextColor(getThemeColor(dialogButtonColorKey)); textView.setGravity(Gravity.CENTER); textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); textView.setEllipsize(TextUtils.TruncateAt.END); textView.setSingleLine(true); textView.setText(neutralButtonText.toString().toUpperCase()); - textView.setBackgroundDrawable(Theme.getRoundRectSelectorDrawable(getThemeColor(Theme.key_dialogButton))); + textView.setBackgroundDrawable(Theme.getRoundRectSelectorDrawable(getThemeColor(dialogButtonColorKey))); textView.setPadding(AndroidUtilities.dp(10), 0, AndroidUtilities.dp(10), 0); if (verticalButtons) { buttonsLayout.addView(textView, 1, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, 36, LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT)); @@ -1015,6 +1017,9 @@ public class AlertDialog extends Dialog implements Drawable.Callback { @Override public void dismiss() { + if (onDismissListener != null) { + onDismissListener.onDismiss(this); + } if (cancelDialog != null) { cancelDialog.dismiss(); } @@ -1176,8 +1181,8 @@ public class AlertDialog extends Dialog implements Drawable.Callback { private AlertDialog alertDialog; - protected Builder(AlertDialog alert){ - alertDialog=alert; + protected Builder(AlertDialog alert) { + alertDialog = alert; } public Builder(Context context) { @@ -1241,6 +1246,11 @@ public class AlertDialog extends Dialog implements Drawable.Callback { return this; } + public Builder setDialogButtonColorKey(String key) { + alertDialog.dialogButtonColorKey = key; + return this; + } + public Builder setTopAnimation(int resId, int backgroundColor) { alertDialog.topAnimationId = resId; alertDialog.topBackgroundColor = backgroundColor; @@ -1329,5 +1339,10 @@ public class AlertDialog extends Dialog implements Drawable.Callback { public void setButtonsVertical(boolean vertical) { alertDialog.verticalButtons = vertical; } + + public Builder setOnPreDismissListener(OnDismissListener onDismissListener) { + alertDialog.onDismissListener = onDismissListener; + return this; + } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BaseFragment.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BaseFragment.java index 54dea6608..448d01bac 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BaseFragment.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BaseFragment.java @@ -8,6 +8,7 @@ package org.telegram.ui.ActionBar; +import android.animation.Animator; import android.animation.AnimatorSet; import android.app.Activity; import android.app.Dialog; @@ -46,7 +47,7 @@ import org.telegram.ui.Components.LayoutHelper; import java.util.ArrayList; -public class BaseFragment { +public abstract class BaseFragment { private boolean isFinished; private boolean finishing; @@ -327,6 +328,10 @@ public class BaseFragment { } + public boolean isLastFragment() { + return parentLayout != null && !parentLayout.fragmentsStack.isEmpty() && parentLayout.fragmentsStack.get(parentLayout.fragmentsStack.size() - 1) == this; + } + public ActionBarLayout getParentLayout() { return parentLayout; } @@ -411,6 +416,10 @@ public class BaseFragment { } } + protected void onSlideProgress(boolean isOpen, float progress) { + + } + protected void onTransitionAnimationProgress(boolean isOpen, float progress) { } @@ -597,4 +606,16 @@ public class BaseFragment { public void saveKeyboardPositionBeforeTransition() { } + + protected Animator getCustomSlideTransition(boolean topFragment, boolean backAnimation, float distanceToMove) { + return null; + } + + protected void prepareFragmentToSlide(boolean topFragment, boolean beginSlide) { + + } + + public void setProgressToDrawerOpened(float v) { + + } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BottomSheet.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BottomSheet.java index 214b35589..7ee178602 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BottomSheet.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BottomSheet.java @@ -58,6 +58,7 @@ import org.telegram.ui.Components.AnimationProperties; import org.telegram.ui.Components.Bulletin; import org.telegram.ui.Components.CubicBezierInterpolator; import org.telegram.ui.Components.LayoutHelper; +import org.telegram.ui.LaunchActivity; import java.util.ArrayList; @@ -107,6 +108,8 @@ public class BottomSheet extends Dialog { private boolean allowCustomAnimation = true; private boolean showWithoutAnimation; + protected int statusBarHeight = AndroidUtilities.statusBarHeight; + protected boolean calcMandatoryInsets; private int touchSlop; @@ -766,6 +769,10 @@ public class BottomSheet extends Dialog { if (Build.VERSION.SDK_INT >= 21) { container.setFitsSystemWindows(true); container.setOnApplyWindowInsetsListener((v, insets) -> { + int newTopInset = insets.getSystemWindowInsetTop(); + if ((newTopInset != 0 || AndroidUtilities.isInMultiwindow) && statusBarHeight != 0 && statusBarHeight != newTopInset) { + statusBarHeight = newTopInset; + } lastInsets = insets; v.requestLayout(); if (Build.VERSION.SDK_INT >= 30) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java index 7989b6833..38d0ce579 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java @@ -193,6 +193,14 @@ public class DrawerLayoutContainer extends FrameLayout { if (drawerLayout.getVisibility() != newVisibility) { drawerLayout.setVisibility(newVisibility); } + BaseFragment currentFragment = parentActionBarLayout.fragmentsStack.get(0); + if (drawerPosition == drawerLayout.getMeasuredWidth()) { + currentFragment.setProgressToDrawerOpened(1f); + } else if (drawerPosition == 0){ + currentFragment.setProgressToDrawerOpened(0); + } else { + currentFragment.setProgressToDrawerOpened(drawerPosition / drawerLayout.getMeasuredWidth()); + } setScrimOpacity(drawerPosition / (float) drawerLayout.getMeasuredWidth()); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/SimpleTextView.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/SimpleTextView.java index bd8f3e4db..a6387e11f 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/SimpleTextView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/SimpleTextView.java @@ -27,6 +27,8 @@ import android.view.Gravity; import android.view.View; import android.view.accessibility.AccessibilityNodeInfo; +import com.google.android.exoplayer2.util.Log; + import org.telegram.messenger.AndroidUtilities; import org.telegram.messenger.LocaleController; import org.telegram.ui.Components.EmptyStubSpan; @@ -79,7 +81,7 @@ public class SimpleTextView extends View implements Drawable.Callback { private static final int SCROLL_SLOWDOWN_PX = 100; private int fullLayoutAdditionalWidth; private int fullLayoutLeftOffset; - private boolean crosfadeFullLayout; + private float fullLayoutLeftCharactersOffset; public SimpleTextView(Context context) { super(context); @@ -186,19 +188,15 @@ public class SimpleTextView extends View implements Drawable.Callback { } if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.CENTER_HORIZONTAL) { - offsetX = (width - textWidth) / 2; + offsetX = (width - textWidth) / 2 - (int) layout.getLineLeft(0); } else if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.LEFT) { - if (crosfadeFullLayout) { - offsetX = 0; - } else if (firstLineLayout != null) { + if (firstLineLayout != null) { offsetX = -(int) firstLineLayout.getLineLeft(0); } else { offsetX = -(int) layout.getLineLeft(0); } } else if (layout.getLineLeft(0) == 0) { - if (crosfadeFullLayout) { - offsetX = 0; - } else if (firstLineLayout != null) { + if (firstLineLayout != null) { offsetX = (int) (width - firstLineLayout.getLineWidth(0)); } else { offsetX = width - textWidth; @@ -208,6 +206,10 @@ public class SimpleTextView extends View implements Drawable.Callback { } offsetX += getPaddingLeft(); textDoesNotFit = textWidth > width; + + if (fullLayout != null && fullLayoutAdditionalWidth > 0) { + fullLayoutLeftCharactersOffset = fullLayout.getPrimaryHorizontal(0) - firstLineLayout.getPrimaryHorizontal(0); + } } } @@ -223,38 +225,30 @@ public class SimpleTextView extends View implements Drawable.Callback { width -= dw; width -= drawablePadding; } - crosfadeFullLayout = false; if (buildFullLayout) { CharSequence string = TextUtils.ellipsize(text, textPaint, width, TextUtils.TruncateAt.END); if (!string.equals(text)) { fullLayout = StaticLayoutEx.createStaticLayout(text, 0, text.length(), textPaint, width, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.END, width, 3, false); if (fullLayout != null) { - if (LocaleController.isRTL || fullLayout.isRtlCharAt(0) && fullLayoutAdditionalWidth != 0) { - layout = StaticLayoutEx.createStaticLayout(text, 0, text.length(), textPaint, width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.END, width, maxLines, false); - fullLayout = StaticLayoutEx.createStaticLayout(text, 0, text.length(), textPaint, width + fullLayoutAdditionalWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.END, width + fullLayoutAdditionalWidth, 3, false); - partLayout = null; - firstLineLayout = null; - crosfadeFullLayout = true; + + int end = fullLayout.getLineEnd(0); + int start = fullLayout.getLineStart(1); + CharSequence substr = text.subSequence(0, end); + SpannableStringBuilder full = SpannableStringBuilder.valueOf(text); + full.setSpan(new EmptyStubSpan(), 0, start, 0); + CharSequence part; + if (end < string.length()) { + part = string.subSequence(end, string.length()); } else { - int end = fullLayout.getLineEnd(0); - int start = fullLayout.getLineStart(1); - CharSequence substr = text.subSequence(0, end); - SpannableStringBuilder full = SpannableStringBuilder.valueOf(text); - full.setSpan(new EmptyStubSpan(), 0, start, 0); - CharSequence part; - if (end < string.length()) { - part = string.subSequence(end, string.length()); - } else { - part = "…"; - } - firstLineLayout = new StaticLayout(string, 0, string.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); - layout = new StaticLayout(substr, 0, substr.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); - if (layout.getLineLeft(0) != 0) { - part = "\u200F" + part; - } - partLayout = new StaticLayout(part, 0, part.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); - fullLayout = StaticLayoutEx.createStaticLayout(full, 0, full.length(), textPaint, width + fullLayoutAdditionalWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.END, width + fullLayoutAdditionalWidth, 3, false); + part = "…"; } + firstLineLayout = new StaticLayout(string, 0, string.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); + layout = new StaticLayout(substr, 0, substr.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); + if (layout.getLineLeft(0) != 0) { + part = "\u200F" + part; + } + partLayout = new StaticLayout(part, 0, part.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); + fullLayout = StaticLayoutEx.createStaticLayout(full, 0, full.length(), textPaint, width + AndroidUtilities.dp(8) + fullLayoutAdditionalWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.END, width + fullLayoutAdditionalWidth, 3, false); } } else { layout = new StaticLayout(string, 0, string.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); @@ -579,7 +573,7 @@ public class SimpleTextView extends View implements Drawable.Callback { } else { canvas.translate(layout.getLineWidth(0) - (partLayout.getText().length() == 1 ? AndroidUtilities.dp(4) : 0), 0); } - canvas.translate(-fullLayoutLeftOffset * fullAlpha, 0); + canvas.translate(-fullLayoutLeftOffset * fullAlpha + fullLayoutLeftCharactersOffset * fullAlpha, 0); partLayout.draw(canvas); canvas.restore(); textPaint.setAlpha(prevAlpha); @@ -588,10 +582,7 @@ public class SimpleTextView extends View implements Drawable.Callback { int prevAlpha = textPaint.getAlpha(); textPaint.setAlpha((int) (255 * fullAlpha)); - if (layout.getLineLeft(0) != 0) { - canvas.translate(-offsetX, 0); - } - canvas.translate(-fullLayoutLeftOffset * fullAlpha, 0); + canvas.translate(-fullLayoutLeftOffset * fullAlpha + fullLayoutLeftCharactersOffset * fullAlpha - fullLayoutLeftCharactersOffset, 0); fullLayout.draw(canvas); textPaint.setAlpha(prevAlpha); } @@ -625,17 +616,9 @@ public class SimpleTextView extends View implements Drawable.Callback { } private void drawLayout(Canvas canvas) { - if (crosfadeFullLayout && fullAlpha > 0) { - int prevAlpha = textPaint.getAlpha(); - textPaint.setAlpha((int) (255 * (1f - fullAlpha))); + if (fullAlpha > 0 && fullLayoutLeftOffset != 0) { canvas.save(); - canvas.translate(-fullLayoutLeftOffset * fullAlpha, 0); - layout.draw(canvas); - textPaint.setAlpha(prevAlpha); - canvas.restore(); - } else if (fullAlpha > 0 && fullLayoutLeftOffset != 0) { - canvas.save(); - canvas.translate(-fullLayoutLeftOffset * fullAlpha, 0); + canvas.translate(-fullLayoutLeftOffset * fullAlpha + fullLayoutLeftCharactersOffset * fullAlpha, 0); layout.draw(canvas); canvas.restore(); } else { @@ -703,6 +686,9 @@ public class SimpleTextView extends View implements Drawable.Callback { this.fullLayoutLeftOffset = fullLayoutLeftOffset; createLayout(getMeasuredWidth()); } + } + public int getTextColor() { + return textPaint.getColor(); } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/Theme.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/Theme.java index 367cafc40..3f21352f7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/Theme.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/Theme.java @@ -2172,6 +2172,7 @@ public class Theme { public static Drawable chat_replyIconDrawable; public static Drawable chat_goIconDrawable; public static Drawable chat_botLinkDrawalbe; + public static Drawable chat_botCardDrawalbe; public static Drawable chat_botInlineDrawable; public static Drawable chat_systemDrawable; public static Drawable chat_commentDrawable; @@ -7202,6 +7203,7 @@ public class Theme { chat_botLinkDrawalbe = resources.getDrawable(R.drawable.bot_link); chat_botInlineDrawable = resources.getDrawable(R.drawable.bot_lines); + chat_botCardDrawalbe = resources.getDrawable(R.drawable.bot_card); chat_commentDrawable = resources.getDrawable(R.drawable.msg_msgbubble); chat_commentStickerDrawable = resources.getDrawable(R.drawable.msg_msgbubble2); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DialogsAdapter.java b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DialogsAdapter.java index d958a19c8..28b4661cb 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DialogsAdapter.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DialogsAdapter.java @@ -204,8 +204,6 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter { if (folderId == 0 && onlineContacts != null) { if (!hasContacts) { onlineContacts = null; - } else { - MessagesController.getInstance(currentAccount).preloadGreetingsSticker(); } } if (folderId == 1 && showArchiveHint) { @@ -508,12 +506,6 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter { } cell.setChecked(selectedDialogs.contains(dialog.id), false); cell.setDialog(dialog, dialogsType, folderId); - if ((int) dialog.id > 0) { - MessageObject message = MessagesController.getInstance(currentAccount).dialogMessage.get(dialog.id); - if (MessageObject.isSystemSignUp(message)) { - MessagesController.getInstance(currentAccount).preloadGreetingsSticker(); - } - } if (preloader != null && i < 10) { preloader.add(dialog.id); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java index 79ecc9a16..ef6bc038c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java @@ -304,7 +304,7 @@ public class DrawerLayoutAdapter extends RecyclerListView.SelectionAdapter { items.add(new Item(8, LocaleController.getString("Settings", R.string.Settings), settingsIcon)); items.add(null); // divider items.add(new Item(7, LocaleController.getString("InviteFriends", R.string.InviteFriends), inviteIcon)); - items.add(new Item(9, LocaleController.getString("TelegramFAQ", R.string.TelegramFAQ), helpIcon)); + items.add(new Item(13, LocaleController.getString("TelegramFeatures", R.string.TelegramFeatures), helpIcon)); } public int getId(int position) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/FiltersView.java b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/FiltersView.java index cbbf4cff1..4e4b52869 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/FiltersView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/FiltersView.java @@ -40,7 +40,6 @@ import org.telegram.ui.Components.CombinedDrawable; import org.telegram.ui.Components.LayoutHelper; import org.telegram.ui.Components.RecyclerListView; -import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; @@ -49,7 +48,6 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import java.util.ArrayList; import java.util.Calendar; -import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; import java.util.regex.Matcher; @@ -730,12 +728,12 @@ public class FiltersView extends RecyclerListView { avatarImageView.setImageDrawable(combinedDrawable); } else { avatarImageView.getImageReceiver().setRoundRadius(AndroidUtilities.dp(16)); - avatarImageView.getImageReceiver().setImage(ImageLocation.getForUser(user, false), "50_50", thumbDrawable, null, user, 0); + avatarImageView.getImageReceiver().setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", thumbDrawable, user, 0); } } else if (data.chat instanceof TLRPC.Chat) { TLRPC.Chat chat = (TLRPC.Chat) data.chat; avatarImageView.getImageReceiver().setRoundRadius(AndroidUtilities.dp(16)); - avatarImageView.getImageReceiver().setImage(ImageLocation.getForChat(chat, false), "50_50", thumbDrawable, null, chat, 0); + avatarImageView.getImageReceiver().setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", thumbDrawable, chat, 0); } } else { avatarImageView.setImageDrawable(thumbDrawable); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java b/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java index 9a975dd7d..f3464151a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java @@ -290,6 +290,8 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg TextSelectionHelper.ArticleTextSelectionHelper textSelectionHelper; TextSelectionHelper.ArticleTextSelectionHelper textSelectionHelperBottomSheet; + PinchToZoomHelper pinchToZoomHelper; + private int allowAnimationIndex = -1; private final String BOTTOM_SHEET_VIEW_TAG = "bottomSheet"; @@ -707,6 +709,10 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg @Override public boolean dispatchTouchEvent(MotionEvent ev) { + if (pinchToZoomHelper.isInOverlayMode()) { + ev.offsetLocation(-containerView.getX(), -containerView.getY()); + return pinchToZoomHelper.onTouchEvent(ev); + } TextSelectionHelper.TextSelectionOverlay selectionOverlay = textSelectionHelper.getOverlayView(getContext()); MotionEvent textSelectionEv = MotionEvent.obtain(ev); textSelectionEv.offsetLocation(-containerView.getX(), -containerView.getY()); @@ -3657,6 +3663,22 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg }); containerView.addView(textSelectionHelper.getOverlayView(activity)); + pinchToZoomHelper = new PinchToZoomHelper(containerView); + pinchToZoomHelper.setClipBoundsListener(new PinchToZoomHelper.ClipBoundsListener() { + @Override + public void getClipTopBottom(float[] topBottom) { + topBottom[0] = currentHeaderHeight; + topBottom[1] = listView[0].getMeasuredHeight(); + } + }); + pinchToZoomHelper.setCallback(new PinchToZoomHelper.Callback() { + @Override + public void onZoomStarted(MessageObject messageObject) { + if (listView[0] != null) { + listView[0].cancelClickRunnables(true); + } + } + }); updatePaintColors(); } @@ -5952,6 +5974,9 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg @Override public boolean onTouchEvent(MotionEvent event) { + if (pinchToZoomHelper.checkPinchToZoom(event, this, imageView, null)) { + return true; + } float x = event.getX(); float y = event.getY(); if (channelCell.getVisibility() == VISIBLE && y > channelCell.getTranslationY() && y < channelCell.getTranslationY() + AndroidUtilities.dp(39)) { @@ -6118,9 +6143,11 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg if (!imageView.hasBitmapImage() || imageView.getCurrentAlpha() != 1.0f) { canvas.drawRect(imageView.getDrawRegion(), photoBackgroundPaint); } - imageView.draw(canvas); - if (imageView.getVisible()) { - radialProgress.draw(canvas); + if (!pinchToZoomHelper.isInOverlayModeFor(this)) { + imageView.draw(canvas); + if (imageView.getVisible()) { + radialProgress.draw(canvas); + } } int count = 0; if (captionLayout != null) { @@ -9831,6 +9858,9 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg @Override public boolean onTouchEvent(MotionEvent event) { + if (pinchToZoomHelper.checkPinchToZoom(event, this, imageView, null)) { + return true; + } float x = event.getX(); float y = event.getY(); if (channelCell.getVisibility() == VISIBLE && y > channelCell.getTranslationY() && y < channelCell.getTranslationY() + AndroidUtilities.dp(39)) { @@ -9992,9 +10022,11 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg if (!imageView.hasBitmapImage() || imageView.getCurrentAlpha() != 1.0f) { canvas.drawRect(imageView.getImageX(), imageView.getImageY(), imageView.getImageX2(), imageView.getImageY2(), photoBackgroundPaint); } - imageView.draw(canvas); - if (imageView.getVisible()) { - radialProgress.draw(canvas); + if (!pinchToZoomHelper.isInOverlayModeFor(this)) { + imageView.draw(canvas); + if (imageView.getVisible()) { + radialProgress.draw(canvas); + } } if (!TextUtils.isEmpty(currentBlock.url)) { int x = getMeasuredWidth() - AndroidUtilities.dp(11 + 24); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java b/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java index 67fd91bb7..3d9eceb18 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java @@ -163,15 +163,15 @@ public class AvatarPreviewer { public static class Data { public static Data of(TLRPC.User user, int classGuid, MenuItem... menuItems) { - final ImageLocation imageLocation = ImageLocation.getForUser(user, true); - final ImageLocation thumbImageLocation = ImageLocation.getForUser(user, false); + final ImageLocation imageLocation = ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_BIG); + final ImageLocation thumbImageLocation = ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL); final String thumbFilter = thumbImageLocation != null && thumbImageLocation.photoSize instanceof TLRPC.TL_photoStrippedSize ? "b" : null; return new Data(imageLocation, thumbImageLocation, null, null, thumbFilter, null, null, user, menuItems, new UserInfoLoadTask(user, classGuid)); } public static Data of(TLRPC.UserFull userFull, MenuItem... menuItems) { - final ImageLocation imageLocation = ImageLocation.getForUser(userFull.user, true); - final ImageLocation thumbImageLocation = ImageLocation.getForUser(userFull.user, false); + final ImageLocation imageLocation = ImageLocation.getForUserOrChat(userFull.user, ImageLocation.TYPE_BIG); + final ImageLocation thumbImageLocation = ImageLocation.getForUserOrChat(userFull.user, ImageLocation.TYPE_SMALL); final String thumbFilter = thumbImageLocation != null && thumbImageLocation.photoSize instanceof TLRPC.TL_photoStrippedSize ? "b" : null; final ImageLocation videoLocation; final String videoFileName; @@ -188,15 +188,15 @@ public class AvatarPreviewer { } public static Data of(TLRPC.Chat chat, int classGuid, MenuItem... menuItems) { - final ImageLocation imageLocation = ImageLocation.getForChat(chat, true); - final ImageLocation thumbImageLocation = ImageLocation.getForChat(chat, false); + final ImageLocation imageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_BIG); + final ImageLocation thumbImageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL); final String thumbFilter = thumbImageLocation != null && thumbImageLocation.photoSize instanceof TLRPC.TL_photoStrippedSize ? "b" : null; return new Data(imageLocation, thumbImageLocation, null, null, thumbFilter, null, null, chat, menuItems, new ChatInfoLoadTask(chat, classGuid)); } public static Data of(TLRPC.Chat chat, TLRPC.ChatFull chatFull, MenuItem... menuItems) { - final ImageLocation imageLocation = ImageLocation.getForChat(chat, true); - final ImageLocation thumbImageLocation = ImageLocation.getForChat(chat, false); + final ImageLocation imageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_BIG); + final ImageLocation thumbImageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL); final String thumbFilter = thumbImageLocation != null && thumbImageLocation.photoSize instanceof TLRPC.TL_photoStrippedSize ? "b" : null; final ImageLocation videoLocation; final String videoFileName; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/CancelAccountDeletionActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/CancelAccountDeletionActivity.java index 5ca7406f5..8daa702c2 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/CancelAccountDeletionActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/CancelAccountDeletionActivity.java @@ -25,6 +25,7 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.graphics.drawable.Drawable; +import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.telephony.PhoneNumberUtils; @@ -553,8 +554,8 @@ public class CancelAccountDeletionActivity extends BaseFragment { PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0); String version = String.format(Locale.US, "%s (%d)", pInfo.versionName, pInfo.versionCode); - Intent mailer = new Intent(Intent.ACTION_SEND); - mailer.setType("message/rfc822"); + Intent mailer = new Intent(Intent.ACTION_SENDTO); + mailer.setData(Uri.parse("mailto:")); mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@stel.com"}); mailer.putExtra(Intent.EXTRA_SUBJECT, "Android cancel account deletion issue " + version + " " + phone); mailer.putExtra(Intent.EXTRA_TEXT, "Phone: " + phone + "\nApp version: " + version + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault() + "\nError: " + lastError); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/AccountSelectCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/AccountSelectCell.java index 6dc5efb73..b770c86e7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/AccountSelectCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/AccountSelectCell.java @@ -110,12 +110,12 @@ public class AccountSelectCell extends FrameLayout { TLRPC.User user = (TLRPC.User) object; avatarDrawable.setInfo(user); infoTextView.setText(ContactsController.formatName(user.first_name, user.last_name)); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } else { TLRPC.Chat chat = (TLRPC.Chat) object; avatarDrawable.setInfo(chat); infoTextView.setText(chat.title); - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } @@ -125,7 +125,7 @@ public class AccountSelectCell extends FrameLayout { avatarDrawable.setInfo(user); textView.setText(ContactsController.formatName(user.first_name, user.last_name)); imageView.getImageReceiver().setCurrentAccount(account); - imageView.setImage(ImageLocation.getForUser(user,false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user,ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); checkImageView.setVisibility(check && account == UserConfig.selectedAccount ? VISIBLE : INVISIBLE); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/AdminedChannelCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/AdminedChannelCell.java index 833781d5d..f5fc04de1 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/AdminedChannelCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/AdminedChannelCell.java @@ -81,7 +81,7 @@ public class AdminedChannelCell extends FrameLayout { SpannableStringBuilder stringBuilder = new SpannableStringBuilder(url + channel.username); stringBuilder.setSpan(new URLSpanNoUnderline(""), url.length(), stringBuilder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); statusTextView.setText(stringBuilder); - avatarImageView.setImage(ImageLocation.getForChat(channel, false), "50_50", avatarDrawable, currentChannel); + avatarImageView.setImage(ImageLocation.getForUserOrChat(channel, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(channel, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentChannel); isLast = last; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java index a94138042..a53acbce7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java @@ -126,6 +126,7 @@ import org.telegram.ui.Components.URLSpanBrowser; import org.telegram.ui.Components.URLSpanMono; import org.telegram.ui.Components.URLSpanNoUnderline; import org.telegram.ui.PhotoViewer; +import org.telegram.ui.PinchToZoomHelper; import org.telegram.ui.SecretMediaViewer; import java.io.File; @@ -257,6 +258,11 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate default boolean shouldDrawThreadProgress(ChatMessageCell cell) { return false; } + + default PinchToZoomHelper getPinchToZoomHelper() { + return null; + } + } private final static int DOCUMENT_ATTACH_TYPE_NONE = 0; @@ -775,6 +781,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate }; private SparseArray accessibilityVirtualViewBounds = new SparseArray<>(); private int currentFocusedVirtualView = -1; + public boolean drawFromPinchToZoom; public ChatMessageCell(Context context) { super(context); @@ -1930,6 +1937,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate boolean result = checkTextBlockMotionEvent(event); + if (!result) { + result = checkPinchToZoom(event); + } if (!result) { result = checkDateMotionEvent(event); } @@ -2196,6 +2206,17 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate return result; } + + private boolean checkPinchToZoom(MotionEvent ev) { + PinchToZoomHelper pinchToZoomHelper = delegate == null ? null : delegate.getPinchToZoomHelper(); + if (currentMessageObject == null || !photoImage.hasNotThumb() || pinchToZoomHelper == null || currentMessageObject.isSticker() || + currentMessageObject.isAnimatedEmoji() || (currentMessageObject.isVideo() && !autoPlayingMedia) || + currentMessageObject.isRoundVideo() || currentMessageObject.isAnimatedSticker() || (currentMessageObject.isDocument() && !currentMessageObject.isGif()) || currentMessageObject.needDrawBluredPreview()) { + return false; + } + return pinchToZoomHelper.checkPinchToZoom(ev, this, photoImage, currentMessageObject); + } + private boolean checkTextSelection(MotionEvent event) { TextSelectionHelper.ChatListTextSelectionHelper textSelectionHelper = delegate.getTextSelectionHelper(); if (textSelectionHelper == null) { @@ -3144,10 +3165,10 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } if (user != null) { commentAvatarDrawables[a].setInfo(user); - commentAvatarImages[a].setImage(ImageLocation.getForUser(user, false), "50_50", commentAvatarDrawables[a], null, user, 0); + commentAvatarImages[a].setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", commentAvatarDrawables[a], user, 0); } else if (chat != null) { commentAvatarDrawables[a].setInfo(chat); - commentAvatarImages[a].setImage(ImageLocation.getForChat(chat, false), "50_50", commentAvatarDrawables[a], null, chat, 0); + commentAvatarImages[a].setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", commentAvatarDrawables[a], chat, 0); } else { commentAvatarDrawables[a].setInfo(id, "", ""); } @@ -3236,9 +3257,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate hasInvoicePreview = messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaInvoice; hasLinkPreview = !messageObject.isRestrictedMessage && messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && messageObject.messageOwner.media.webpage instanceof TLRPC.TL_webPage; drawInstantView = hasLinkPreview && messageObject.messageOwner.media.webpage.cached_page != null; - hasEmbed = hasLinkPreview && !TextUtils.isEmpty(messageObject.messageOwner.media.webpage.embed_url) && !messageObject.isGif(); - boolean slideshow = false; String siteName = hasLinkPreview ? messageObject.messageOwner.media.webpage.site_name : null; + hasEmbed = hasLinkPreview && !TextUtils.isEmpty(messageObject.messageOwner.media.webpage.embed_url) && !messageObject.isGif() && !"instangram".equalsIgnoreCase(siteName); + boolean slideshow = false; String webpageType = hasLinkPreview ? messageObject.messageOwner.media.webpage.type : null; TLRPC.Document androidThemeDocument = null; TLRPC.TL_themeSettings androidThemeSettings = null; @@ -3908,8 +3929,21 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate width = height = maxPhotoWidth; } else { if (hasGamePreview || hasInvoicePreview) { - width = 640; - height = 360; + if (hasInvoicePreview) { + width = 640; + height = 360; + for (int a = 0, N = webDocument.attributes.size(); a < N; a++) { + TLRPC.DocumentAttribute attribute = webDocument.attributes.get(a); + if (attribute instanceof TLRPC.TL_documentAttributeImageSize) { + width = attribute.w; + height = attribute.h; + break; + } + } + } else { + width = 640; + height = 360; + } float scale = width / (float) (maxPhotoWidth - AndroidUtilities.dp(2)); width /= scale; height /= scale; @@ -4202,7 +4236,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } else { hasName = false; } - photoImage.setImage(ImageLocation.getForUser(user, false), "50_50", hasName ? contactAvatarDrawable : Theme.chat_contactDrawable[messageObject.isOutOwner() ? 1 : 0], null, messageObject, 0); + photoImage.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", hasName ? contactAvatarDrawable : Theme.chat_contactDrawable[messageObject.isOutOwner() ? 1 : 0], messageObject, 0); CharSequence phone; if (!TextUtils.isEmpty(messageObject.vCardData)) { @@ -4394,7 +4428,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(id); if (user != null) { pollAvatarDrawables[a].setInfo(user); - pollAvatarImages[a].setImage(ImageLocation.getForUser(user, false), "50_50", pollAvatarDrawables[a], null, user, 0); + pollAvatarImages[a].setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", pollAvatarDrawables[a], user, 0); } else { pollAvatarDrawables[a].setInfo(id, "", ""); } @@ -4728,13 +4762,13 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate updateCurrentUserAndChat(); if (currentUser != null) { contactAvatarDrawable.setInfo(currentUser); - locationImageReceiver.setImage(ImageLocation.getForUser(currentUser, false), "50_50", contactAvatarDrawable, null, currentUser, 0); + locationImageReceiver.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", contactAvatarDrawable, currentUser, 0); } else if (currentChat != null) { if (currentChat.photo != null) { currentPhoto = currentChat.photo.photo_small; } contactAvatarDrawable.setInfo(currentChat); - locationImageReceiver.setImage(ImageLocation.getForChat(currentChat, false), "50_50", contactAvatarDrawable, null, currentChat, 0); + locationImageReceiver.setImage(ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_STRIPPED), "50_50", contactAvatarDrawable, currentChat, 0); } else { locationImageReceiver.setImage(null, null, contactAvatarDrawable, null, null, 0); } @@ -4809,7 +4843,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } else if (currentMapProvider == 2) { if (currentWebFile != null) { ImageLocation lastLocation = lastWebFile == null ? null : ImageLocation.getForWebFile(lastWebFile); - photoImage.setImage(ImageLocation.getForWebFile(currentWebFile), null, lastLocation, null, null, messageObject, 0); + photoImage.setImage(ImageLocation.getForWebFile(currentWebFile), null, lastLocation, null, (Drawable) null, messageObject, 0); } } else { if (currentMapProvider == 3 || currentMapProvider == 4) { @@ -7097,7 +7131,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate buttonY = this.buttonY = (int) (photoImage.getImageY() + (photoImage.getImageHeight() - size) / 2.0f); radialProgress.setProgressRect((int) buttonX, (int ) buttonY, (int) buttonX + size, (int) buttonY + size); } - imageDrawn = photoImage.draw(canvas); + if (delegate == null || delegate.getPinchToZoomHelper() == null || !delegate.getPinchToZoomHelper().isInOverlayModeFor(this)) { + imageDrawn = photoImage.draw(canvas); + } } linkPreviewY += photoImage.getImageHeight() + AndroidUtilities.dp(6); } @@ -7180,7 +7216,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate imageDrawn = true; drawTime = true; } else { - imageDrawn = photoImage.draw(canvas); + if (delegate == null || delegate.getPinchToZoomHelper() == null || !delegate.getPinchToZoomHelper().isInOverlayModeFor(this)) { + imageDrawn = photoImage.draw(canvas); + } } } if (documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO || documentAttachType == DOCUMENT_ATTACH_TYPE_GIF) { @@ -7330,7 +7368,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } else { photoImage.setSideClip(0); } - imageDrawn = photoImage.draw(canvas); + if (delegate == null || delegate.getPinchToZoomHelper() == null || !delegate.getPinchToZoomHelper().isInOverlayModeFor(this)) { + imageDrawn = photoImage.draw(canvas); + } boolean drawTimeOld = drawTime; drawTime = photoImage.getVisible(); if (currentPosition != null && drawTimeOld != drawTime) { @@ -7796,11 +7836,19 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate setDrawableBounds(Theme.chat_botInlineDrawable, x, y + AndroidUtilities.dp(3)); Theme.chat_botInlineDrawable.draw(canvas); } else if (button.button instanceof TLRPC.TL_keyboardButtonCallback || button.button instanceof TLRPC.TL_keyboardButtonRequestGeoLocation || button.button instanceof TLRPC.TL_keyboardButtonGame || button.button instanceof TLRPC.TL_keyboardButtonBuy || button.button instanceof TLRPC.TL_keyboardButtonUrlAuth) { + if (button.button instanceof TLRPC.TL_keyboardButtonBuy) { + int x = button.x + button.width - AndroidUtilities.dp(5) - Theme.chat_botCardDrawalbe.getIntrinsicWidth() + addX; + setDrawableBounds(Theme.chat_botCardDrawalbe, x, y + AndroidUtilities.dp(4)); + Theme.chat_botCardDrawalbe.draw(canvas); + } boolean drawProgress = (button.button instanceof TLRPC.TL_keyboardButtonCallback || button.button instanceof TLRPC.TL_keyboardButtonGame || button.button instanceof TLRPC.TL_keyboardButtonBuy || button.button instanceof TLRPC.TL_keyboardButtonUrlAuth) && SendMessagesHelper.getInstance(currentAccount).isSendingCallback(currentMessageObject, button.button) || button.button instanceof TLRPC.TL_keyboardButtonRequestGeoLocation && SendMessagesHelper.getInstance(currentAccount).isSendingCurrentLocation(currentMessageObject, button.button); if (drawProgress || button.progressAlpha != 0) { Theme.chat_botProgressPaint.setAlpha(Math.min(255, (int) (button.progressAlpha * 255))); int x = button.x + button.width - AndroidUtilities.dp(9 + 3) + addX; + if (button.button instanceof TLRPC.TL_keyboardButtonBuy) { + y += AndroidUtilities.dp(26); + } rect.set(x, y + AndroidUtilities.dp(4), x + AndroidUtilities.dp(8), y + AndroidUtilities.dp(8 + 4)); canvas.drawArc(rect, button.angle, 220, false, Theme.chat_botProgressPaint); invalidate(); @@ -9150,7 +9198,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate currentPhoto = null; } avatarDrawable.setInfo(currentUser); - avatarImage.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, null, currentUser, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser, 0); } else if (currentChat != null) { if (currentChat.photo != null) { currentPhoto = currentChat.photo.photo_small; @@ -9158,7 +9206,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate currentPhoto = null; } avatarDrawable.setInfo(currentChat); - avatarImage.setImage(ImageLocation.getForChat(currentChat, false), "50_50", avatarDrawable, null, currentChat, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentChat, 0); } else { currentPhoto = null; avatarDrawable.setInfo(messageObject.getFromChatId(), null, null); @@ -11020,7 +11068,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate return !forceNotDrawTime; } - private boolean shouldDrawTimeOnMedia() { + public boolean shouldDrawTimeOnMedia() { if (overideShouldDrawTimeOnMedia != 0) { return overideShouldDrawTimeOnMedia == 1; } @@ -11028,6 +11076,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } public void drawTime(Canvas canvas, float alpha, boolean fromParent) { + if (!drawFromPinchToZoom && delegate != null && delegate.getPinchToZoomHelper() != null && delegate.getPinchToZoomHelper().isInOverlayModeFor(this) && shouldDrawTimeOnMedia()) { + return; + } for (int i = 0; i < 2; i++) { float curentAplha = alpha; if (i == 0 && isDrawSelectionBackground() && currentSelectedBackgroundAlpha == 1f && !shouldDrawTimeOnMedia()) { @@ -11828,6 +11879,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } public void drawOverlays(Canvas canvas) { + if (!drawFromPinchToZoom && delegate != null && delegate.getPinchToZoomHelper() != null && delegate.getPinchToZoomHelper().isInOverlayModeFor(this)) { + return; + } long newAnimationTime = SystemClock.elapsedRealtime(); long animationDt = newAnimationTime - lastAnimationTime; if (animationDt > 17) { @@ -13127,6 +13181,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate info.setParent(ChatMessageCell.this); info.setPackageName(getContext().getPackageName()); if (virtualViewId >= LINK_IDS_START) { + if (!(currentMessageObject.messageText instanceof Spannable)) { + return null; + } Spannable buffer = (Spannable) currentMessageObject.messageText; ClickableSpan link = getLinkById(virtualViewId); if (link == null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/CheckBoxUserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/CheckBoxUserCell.java index 040e158e9..490c179fe 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/CheckBoxUserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/CheckBoxUserCell.java @@ -77,7 +77,7 @@ public class CheckBoxUserCell extends FrameLayout { textView.setText(ContactsController.formatName(user.first_name, user.last_name)); checkBox.setChecked(checked, false); avatarDrawable.setInfo(user); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); needDivider = divider; setWillNotDraw(!divider); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogCell.java index 0b46bad2a..ef3c8af61 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogCell.java @@ -981,7 +981,7 @@ public class DialogCell extends BaseCell { } thumbImage.setImage(ImageLocation.getForObject(bigThumb, message.photoThumbsObject), "20_20", ImageLocation.getForObject(smallThumb, message.photoThumbsObject), "20_20", size, null, message, 0); } else { - thumbImage.setImage(null, null, ImageLocation.getForObject(smallThumb, message.photoThumbsObject), "20_20", null, message, 0); + thumbImage.setImage(null, null, ImageLocation.getForObject(smallThumb, message.photoThumbsObject), "20_20", (Drawable) null, message, 0); } needEmoji = false; } @@ -2113,11 +2113,11 @@ public class DialogCell extends BaseCell { avatarDrawable.setAvatarType(AvatarDrawable.AVATAR_TYPE_SAVED); avatarImage.setImage(null, null, avatarDrawable, null, user, 0); } else { - avatarImage.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, null, user, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user, 0); } } else if (chat != null) { avatarDrawable.setInfo(chat); - avatarImage.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, null, chat, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat, 0); } } @@ -2236,7 +2236,10 @@ public class DialogCell extends BaseCell { boolean needInvalidate = false; if (currentDialogFolderId != 0 && archivedChatsDrawable != null && archivedChatsDrawable.outProgress == 0.0f && translationX == 0.0f) { + canvas.save(); + canvas.clipRect(0, 0, getMeasuredWidth(), getMeasuredHeight()); archivedChatsDrawable.draw(canvas); + canvas.restore(); return; } @@ -2892,7 +2895,10 @@ public class DialogCell extends BaseCell { canvas.restore(); } if (currentDialogFolderId != 0 && translationX == 0 && archivedChatsDrawable != null) { + canvas.save(); + canvas.clipRect(0, 0, getMeasuredWidth(), getMeasuredHeight()); archivedChatsDrawable.draw(canvas); + canvas.restore(); } if (useSeparator) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogMeUrlCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogMeUrlCell.java index 9d6db96b2..d4226ea95 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogMeUrlCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DialogMeUrlCell.java @@ -129,7 +129,7 @@ public class DialogMeUrlCell extends BaseCell { } nameString = chat.title; avatarDrawable.setInfo(chat); - avatarImage.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, null, recentMeUrl, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, recentMeUrl, 0); } else if (recentMeUrl instanceof TLRPC.TL_recentMeUrlUser) { TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(recentMeUrl.user_id); if (!LocaleController.isRTL) { @@ -153,7 +153,7 @@ public class DialogMeUrlCell extends BaseCell { } nameString = UserObject.getUserName(user); avatarDrawable.setInfo(user); - avatarImage.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, null, recentMeUrl, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, recentMeUrl, 0); } else if (recentMeUrl instanceof TLRPC.TL_recentMeUrlStickerSet) { if (!LocaleController.isRTL) { nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline); @@ -180,7 +180,7 @@ public class DialogMeUrlCell extends BaseCell { nameLockTop = AndroidUtilities.dp(17.5f); } drawVerified = recentMeUrl.chat_invite.chat.verified; - avatarImage.setImage(ImageLocation.getForChat(recentMeUrl.chat_invite.chat, false), "50_50", avatarDrawable, null, recentMeUrl, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(recentMeUrl.chat_invite.chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(recentMeUrl.chat_invite.chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, recentMeUrl, 0); } else { nameString = recentMeUrl.chat_invite.title; avatarDrawable.setInfo(5, recentMeUrl.chat_invite.title, null); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java index 112a8d315..c24c458dc 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java @@ -351,7 +351,7 @@ public class DrawerProfileCell extends FrameLayout { phoneTextView.setText(PhoneFormat.getInstance().format("+" + user.phone)); AvatarDrawable avatarDrawable = new AvatarDrawable(user); avatarDrawable.setColor(Theme.getColor(Theme.key_avatar_backgroundInProfileBlue)); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); applyBackground(true); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerUserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerUserCell.java index 7b7650656..53a9857bd 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerUserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerUserCell.java @@ -91,7 +91,7 @@ public class DrawerUserCell extends FrameLayout { avatarDrawable.setInfo(user); textView.setText(ContactsController.formatName(user.first_name, user.last_name)); imageView.getImageReceiver().setCurrentAccount(account); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); checkBox.setVisibility(account == UserConfig.selectedAccount ? VISIBLE : INVISIBLE); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallInvitedCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallInvitedCell.java index e7a5e73ec..9d33cfb42 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallInvitedCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallInvitedCell.java @@ -91,7 +91,7 @@ public class GroupCallInvitedCell extends FrameLayout { nameTextView.setText(lastName); avatarImageView.getImageReceiver().setCurrentAccount(account); - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } public void setDrawDivider(boolean draw) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallUserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallUserCell.java index bbfd123fa..2e5d92d71 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallUserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCallUserCell.java @@ -45,8 +45,8 @@ import org.telegram.ui.Components.CubicBezierInterpolator; import org.telegram.ui.Components.LayoutHelper; import org.telegram.ui.Components.RLottieDrawable; import org.telegram.ui.Components.RLottieImageView; +import org.telegram.ui.Components.RadialProgressView; import org.telegram.ui.Components.WaveDrawable; -import org.telegram.ui.ProfileActivity; import java.util.ArrayList; @@ -57,10 +57,13 @@ public class GroupCallUserCell extends FrameLayout { private BackupImageView avatarImageView; private SimpleTextView nameTextView; private SimpleTextView[] statusTextView = new SimpleTextView[5]; + private SimpleTextView fullAboutTextView; private RLottieImageView muteButton; private RLottieDrawable muteDrawable; private RLottieDrawable shakeHandDrawable; + private RadialProgressView avatarProgressView; + private AvatarDrawable avatarDrawable; private ChatObject.Call currentCall; @@ -81,7 +84,6 @@ public class GroupCallUserCell extends FrameLayout { private int currentStatus; private int selfId; - private Runnable shakeHandCallback = () -> { shakeHandDrawable.setOnFinishCallback(null, 0); muteDrawable.setOnFinishCallback(null, 0); @@ -132,6 +134,7 @@ public class GroupCallUserCell extends FrameLayout { private boolean updateRunnableScheduled; private boolean updateVoiceRunnableScheduled; private boolean isSpeaking; + private boolean hasAvatar; private Drawable speakingDrawable; @@ -142,17 +145,29 @@ public class GroupCallUserCell extends FrameLayout { public void setProgressToAvatarPreview(float progressToAvatarPreview) { this.progressToAvatarPreview = progressToAvatarPreview; nameTextView.setTranslationX((LocaleController.isRTL ? AndroidUtilities.dp(53) : -AndroidUtilities.dp(53)) * progressToAvatarPreview); - for (int i = 0; i < statusTextView.length; i++) { - if (!TextUtils.isEmpty(statusTextView[4].getText()) && statusTextView[4].getLineCount() > 1) { - statusTextView[i].setFullLayoutAdditionalWidth(AndroidUtilities.dp(92), LocaleController.isRTL ? AndroidUtilities.dp(48) : AndroidUtilities.dp(53)); - statusTextView[i].setFullAlpha(progressToAvatarPreview); - statusTextView[i].setTranslationX(0); - statusTextView[i].invalidate(); - } else { - statusTextView[i].setTranslationX((LocaleController.isRTL ? AndroidUtilities.dp(53) : -AndroidUtilities.dp(53)) * progressToAvatarPreview); - statusTextView[i].setFullLayoutAdditionalWidth(0, 0); + + if (isSelfUser() && progressToAvatarPreview > 0) { + fullAboutTextView.setTranslationX((LocaleController.isRTL ? -AndroidUtilities.dp(53) : AndroidUtilities.dp(53)) * (1f - progressToAvatarPreview)); + fullAboutTextView.setVisibility(View.VISIBLE); + fullAboutTextView.setAlpha(progressToAvatarPreview); + statusTextView[4].setAlpha(1f - progressToAvatarPreview); + statusTextView[4].setTranslationX((LocaleController.isRTL ? AndroidUtilities.dp(53) : -AndroidUtilities.dp(53)) * progressToAvatarPreview); + } else { + fullAboutTextView.setVisibility(View.GONE); + + for (int i = 0; i < statusTextView.length; i++) { + if (!TextUtils.isEmpty(statusTextView[4].getText()) && statusTextView[4].getLineCount() > 1) { + statusTextView[i].setFullLayoutAdditionalWidth(AndroidUtilities.dp(92), LocaleController.isRTL ? AndroidUtilities.dp(48) : AndroidUtilities.dp(53)); + statusTextView[i].setFullAlpha(progressToAvatarPreview); + statusTextView[i].setTranslationX(0); + statusTextView[i].invalidate(); + } else { + statusTextView[i].setTranslationX((LocaleController.isRTL ? AndroidUtilities.dp(53) : -AndroidUtilities.dp(53)) * progressToAvatarPreview); + statusTextView[i].setFullLayoutAdditionalWidth(0, 0); + } } } + avatarImageView.setAlpha(progressToAvatarPreview == 0 ? 1f : 0); avatarWavesDrawable.setShowWaves(isSpeaking && progressToAvatarPreview == 0, this); @@ -160,6 +175,8 @@ public class GroupCallUserCell extends FrameLayout { muteButton.setAlpha(1f - progressToAvatarPreview); muteButton.setScaleX(0.6f + 0.4f * (1f - progressToAvatarPreview)); muteButton.setScaleY(0.6f + 0.4f * (1f - progressToAvatarPreview)); + + invalidate(); } @@ -167,6 +184,15 @@ public class GroupCallUserCell extends FrameLayout { return avatarWavesDrawable; } + public void setUploadProgress(float progress, boolean animated) { + avatarProgressView.setProgress(progress); + if (progress < 1f) { + AndroidUtilities.updateViewVisibilityAnimated(avatarProgressView, true, 1f, animated); + } else { + AndroidUtilities.updateViewVisibilityAnimated(avatarProgressView, false, 1f, animated); + } + } + private static class VerifiedDrawable extends Drawable { private Drawable[] drawables = new Drawable[2]; @@ -227,6 +253,28 @@ public class GroupCallUserCell extends FrameLayout { avatarImageView.setRoundRadius(AndroidUtilities.dp(24)); addView(avatarImageView, LayoutHelper.createFrame(46, 46, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 0 : 11, 6, LocaleController.isRTL ? 11 : 0, 0)); + avatarProgressView = new RadialProgressView(context) { + private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); + { + paint.setColor(0x55000000); + } + + @Override + protected void onDraw(Canvas canvas) { + if (avatarImageView.getImageReceiver().hasNotThumb() && avatarImageView.getAlpha() > 0) { + paint.setAlpha((int) (0x55 * avatarImageView.getImageReceiver().getCurrentAlpha() * avatarImageView.getAlpha())); + canvas.drawCircle(getMeasuredWidth() / 2.0f, getMeasuredHeight() / 2.0f, getMeasuredWidth() / 2.0f, paint); + } + avatarProgressView.setProgressColor(ColorUtils.setAlphaComponent(0xffffffff, (int) (255 * avatarImageView.getImageReceiver().getCurrentAlpha() * avatarImageView.getAlpha()))); + super.onDraw(canvas); + } + }; + avatarProgressView.setSize(AndroidUtilities.dp(26)); + avatarProgressView.setProgressColor(0xffffffff); + avatarProgressView.setNoProgress(false); + addView(avatarProgressView, LayoutHelper.createFrame(46, 46, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 0 : 11, 6, LocaleController.isRTL ? 11 : 0, 0)); + AndroidUtilities.updateViewVisibilityAnimated(avatarProgressView, false, 1f, false); + nameTextView = new SimpleTextView(context); nameTextView.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); nameTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); @@ -247,15 +295,18 @@ public class GroupCallUserCell extends FrameLayout { @Override public void setAlpha(float alpha) { originalAlpha = alpha; + float alphaOverride; if (num == 4) { - float alphaOverride = statusTextView[4].getFullAlpha(); - if (alphaOverride > 0) { + alphaOverride = statusTextView[4].getFullAlpha(); + if (isSelfUser() && progressToAvatarPreview > 0) { + super.setAlpha(1f - progressToAvatarPreview); + } else if (alphaOverride > 0) { super.setAlpha(Math.max(alpha, alphaOverride)); } else { super.setAlpha(alpha); } } else { - float alphaOverride = 1.0f - statusTextView[4].getFullAlpha(); + alphaOverride = 1.0f - statusTextView[4].getFullAlpha(); super.setAlpha(alpha * alphaOverride); } } @@ -306,6 +357,13 @@ public class GroupCallUserCell extends FrameLayout { } } + fullAboutTextView = new SimpleTextView(context); + fullAboutTextView.setMaxLines(3); + fullAboutTextView.setTextSize(15); + fullAboutTextView.setTextColor(Theme.getColor(Theme.key_voipgroup_mutedIcon)); + fullAboutTextView.setVisibility(View.GONE); + addView(fullAboutTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 20 * 3, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 14, 32, 14, 0)); + muteDrawable = new RLottieDrawable(R.raw.voice_outlined2, "" + R.raw.voice_outlined2, AndroidUtilities.dp(34), AndroidUtilities.dp(32), true, null); shakeHandDrawable = new RLottieDrawable(R.raw.hand_1, "" + R.raw.hand_1, AndroidUtilities.dp(34), AndroidUtilities.dp(32), true, null); @@ -333,10 +391,16 @@ public class GroupCallUserCell extends FrameLayout { } public int getClipHeight() { - int lineCount = statusTextView[4].getLineCount(); + SimpleTextView aboutTextView; + if (!TextUtils.isEmpty(fullAboutTextView.getText()) && hasAvatar) { + aboutTextView = fullAboutTextView; + } else { + aboutTextView = statusTextView[4]; + } + int lineCount = aboutTextView.getLineCount(); if (lineCount > 1) { - int h = statusTextView[4].getTextHeight(); - return statusTextView[4].getTop() + h + AndroidUtilities.dp(8); + int h = aboutTextView.getTextHeight(); + return aboutTextView.getTop() + h + AndroidUtilities.dp(8); } return getMeasuredHeight(); } @@ -377,7 +441,7 @@ public class GroupCallUserCell extends FrameLayout { return avatarImageView.getImageReceiver().hasNotThumb(); } - public void setData(AccountInstance account, TLRPC.TL_groupCallParticipant groupCallParticipant, ChatObject.Call call, int self) { + public void setData(AccountInstance account, TLRPC.TL_groupCallParticipant groupCallParticipant, ChatObject.Call call, int self, TLRPC.FileLocation uploadingAvatar) { currentCall = call; accountInstance = account; selfId = self; @@ -393,7 +457,14 @@ public class GroupCallUserCell extends FrameLayout { nameTextView.setText(UserObject.getUserName(currentUser)); nameTextView.setRightDrawable(currentUser != null && currentUser.verified ? new VerifiedDrawable(getContext()) : null); avatarImageView.getImageReceiver().setCurrentAccount(account.getCurrentAccount()); - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + if (uploadingAvatar != null) { + hasAvatar = true; + avatarImageView.setImage(ImageLocation.getForLocal(uploadingAvatar), "50_50", avatarDrawable, null); + } else { + ImageLocation imageLocation = ImageLocation.getForUser(currentUser, ImageLocation.TYPE_SMALL); + hasAvatar = imageLocation != null; + avatarImageView.setImage(imageLocation, "50_50", avatarDrawable, currentUser); + } } else { currentChat = accountInstance.getMessagesController().getChat(-id); currentUser = null; @@ -403,9 +474,17 @@ public class GroupCallUserCell extends FrameLayout { nameTextView.setText(currentChat.title); nameTextView.setRightDrawable(currentChat.verified ? new VerifiedDrawable(getContext()) : null); avatarImageView.getImageReceiver().setCurrentAccount(account.getCurrentAccount()); - avatarImageView.setImage(ImageLocation.getForChat(currentChat, false), "50_50", avatarDrawable, currentChat); + if (uploadingAvatar != null) { + hasAvatar = true; + avatarImageView.setImage(ImageLocation.getForLocal(uploadingAvatar), "50_50", avatarDrawable, null); + } else { + ImageLocation imageLocation = ImageLocation.getForChat(currentChat, ImageLocation.TYPE_SMALL); + hasAvatar = imageLocation != null; + avatarImageView.setImage(imageLocation, "50_50", avatarDrawable, currentChat); + } } } + applyParticipantChanges(false); } public void setDrawDivider(boolean draw) { @@ -578,18 +657,45 @@ public class GroupCallUserCell extends FrameLayout { } } - if (isSelfUser()) { - statusTextView[4].setTextColor(Theme.getColor(Theme.key_voipgroup_listeningText)); - } else { + if (!isSelfUser()) { statusTextView[4].setTextColor(Theme.getColor(grayIconColor)); } if (isSelfUser()) { - statusTextView[4].setText(LocaleController.getString("ThisIsYou", R.string.ThisIsYou)); + if (!hasAbout && !hasAvatar) { + if (currentUser != null) { + statusTextView[4].setText(LocaleController.getString("TapToAddPhotoOrBio", R.string.TapToAddPhotoOrBio)); + } else { + statusTextView[4].setText(LocaleController.getString("TapToAddPhotoOrDescription", R.string.TapToAddPhotoOrDescription)); + } + statusTextView[4].setTextColor(Theme.getColor(grayIconColor)); + } else if (!hasAbout ){ + if (currentUser != null) { + statusTextView[4].setText(LocaleController.getString("TapToAddBio", R.string.TapToAddBio)); + } else { + statusTextView[4].setText(LocaleController.getString("TapToAddDescription", R.string.TapToAddDescription)); + } + statusTextView[4].setTextColor(Theme.getColor(grayIconColor)); + } else if (!hasAvatar) { + statusTextView[4].setText(LocaleController.getString("TapToAddPhoto", R.string.TapToAddPhoto)); + statusTextView[4].setTextColor(Theme.getColor(grayIconColor)); + } else { + statusTextView[4].setText(LocaleController.getString("ThisIsYou", R.string.ThisIsYou)); + statusTextView[4].setTextColor(Theme.getColor(Theme.key_voipgroup_listeningText)); + } + if (hasAbout) { + fullAboutTextView.setText(AndroidUtilities.replaceNewLines(participant.about)); + fullAboutTextView.setTextColor(Theme.getColor(Theme.key_voipgroup_mutedIcon)); + } else { + fullAboutTextView.setText(statusTextView[newStatus].getText()); + fullAboutTextView.setTextColor(statusTextView[newStatus].getTextColor()); + } } else if (hasAbout) { statusTextView[4].setText(AndroidUtilities.replaceNewLines(participant.about)); + fullAboutTextView.setText(""); } else { statusTextView[4].setText(""); + fullAboutTextView.setText(""); } boolean somethingChanged = false; if (animatorSet != null) { @@ -626,7 +732,7 @@ public class GroupCallUserCell extends FrameLayout { int volume = vol / 100; if (volume != 100) { statusTextView[1].setLeftDrawable(speakingDrawable); - statusTextView[1].setText((vol < 100 ? 1 : volume) + "% " + LocaleController.getString("Speaking", R.string.Speaking)); + statusTextView[1].setText(LocaleController.formatString("SpeakingWithVolume", R.string.SpeakingWithVolume, vol < 100 ? 1 : volume)); } else { statusTextView[1].setLeftDrawable(null); statusTextView[1].setText(LocaleController.getString("Speaking", R.string.Speaking)); @@ -766,6 +872,8 @@ public class GroupCallUserCell extends FrameLayout { avatarImageView.setScaleX(avatarWavesDrawable.getAvatarScale()); avatarImageView.setScaleY(avatarWavesDrawable.getAvatarScale()); + avatarProgressView.setScaleX(avatarWavesDrawable.getAvatarScale()); + avatarProgressView.setScaleY(avatarWavesDrawable.getAvatarScale()); super.dispatchDraw(canvas); } @@ -913,6 +1021,7 @@ public class GroupCallUserCell extends FrameLayout { return avatarImageView; } + @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCreateUserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCreateUserCell.java index c3004876f..78dad291a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCreateUserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/GroupCreateUserCell.java @@ -330,7 +330,7 @@ public class GroupCreateUserCell extends FrameLayout { } } - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } else { TLRPC.Chat currentChat = (TLRPC.Chat) currentObject; if (currentChat.photo != null) { @@ -390,7 +390,7 @@ public class GroupCreateUserCell extends FrameLayout { } } - avatarImageView.setImage(ImageLocation.getForChat(currentChat, false), "50_50", avatarDrawable, currentChat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentChat); } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/HintDialogCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/HintDialogCell.java index 801e04156..d18cddd94 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/HintDialogCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/HintDialogCell.java @@ -11,8 +11,6 @@ package org.telegram.ui.Cells; import android.content.Context; import android.graphics.Canvas; import android.graphics.RectF; -import android.text.Layout; -import android.text.StaticLayout; import android.text.TextUtils; import android.util.TypedValue; import android.view.Gravity; @@ -130,7 +128,7 @@ public class HintDialogCell extends FrameLayout { nameTextView.setText(""); } avatarDrawable.setInfo(currentUser); - imageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + imageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } else { TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-uid); if (name != null) { @@ -142,7 +140,7 @@ public class HintDialogCell extends FrameLayout { } avatarDrawable.setInfo(chat); currentUser = null; - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } if (counter) { update(0); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/JoinSheetUserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/JoinSheetUserCell.java index a134e6922..1c21246f4 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/JoinSheetUserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/JoinSheetUserCell.java @@ -58,7 +58,7 @@ public class JoinSheetUserCell extends FrameLayout { public void setUser(TLRPC.User user) { nameTextView.setText(ContactsController.formatName(user.first_name, user.last_name)); avatarDrawable.setInfo(user); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } public void setCount(int count) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ManageChatUserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ManageChatUserCell.java index c08857730..22fcc3a87 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ManageChatUserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ManageChatUserCell.java @@ -260,7 +260,7 @@ public class ManageChatUserCell extends FrameLayout { } } lastAvatar = photo; - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } else if (currentObject instanceof TLRPC.Chat) { TLRPC.Chat currentChat = (TLRPC.Chat) currentObject; @@ -317,7 +317,7 @@ public class ManageChatUserCell extends FrameLayout { } } lastAvatar = photo; - avatarImageView.setImage(ImageLocation.getForChat(currentChat, false), "50_50", avatarDrawable, currentChat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentChat); } else if (currentObject instanceof Integer) { nameTextView.setText(currentName); statusTextView.setTextColor(statusColor); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/MentionCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/MentionCell.java index 0152ee1a0..a3bc21010 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/MentionCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/MentionCell.java @@ -76,7 +76,7 @@ public class MentionCell extends LinearLayout { } avatarDrawable.setInfo(user); if (user.photo != null && user.photo.photo_small != null) { - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } else { imageView.setImageDrawable(avatarDrawable); } @@ -99,7 +99,7 @@ public class MentionCell extends LinearLayout { } avatarDrawable.setInfo(chat); if (chat.photo != null && chat.photo.photo_small != null) { - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } else { imageView.setImageDrawable(avatarDrawable); } @@ -140,7 +140,7 @@ public class MentionCell extends LinearLayout { imageView.setVisibility(VISIBLE); avatarDrawable.setInfo(user); if (user.photo != null && user.photo.photo_small != null) { - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } else { imageView.setImageDrawable(avatarDrawable); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/PaymentInfoCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/PaymentInfoCell.java index da858bba3..66fb58991 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/PaymentInfoCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/PaymentInfoCell.java @@ -60,25 +60,27 @@ public class PaymentInfoCell extends FrameLayout { detailExTextView = new TextView(context); detailExTextView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2)); - detailExTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13); + detailExTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); detailExTextView.setLines(1); detailExTextView.setMaxLines(1); detailExTextView.setSingleLine(true); detailExTextView.setEllipsize(TextUtils.TruncateAt.END); detailExTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP); - addView(detailExTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 10 : 123, 90, LocaleController.isRTL ? 123 : 10, 0)); + addView(detailExTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 10 : 123, 90, LocaleController.isRTL ? 123 : 10, 9)); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(120), MeasureSpec.EXACTLY)); - } - - @Override - protected void onLayout(boolean changed, int left, int top, int right, int bottom) { - super.onLayout(changed, left, top, right, bottom); - top = detailTextView.getBottom() + AndroidUtilities.dp(3); - detailExTextView.layout(detailExTextView.getLeft(), top, detailExTextView.getRight(), top + detailExTextView.getMeasuredHeight()); + int h; + if (imageView.getVisibility() != GONE) { + h = MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(120), MeasureSpec.EXACTLY); + } else { + h = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); + measureChildWithMargins(detailTextView, widthMeasureSpec, 0, heightMeasureSpec, 0); + FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) detailExTextView.getLayoutParams(); + layoutParams.topMargin = AndroidUtilities.dp(33) + detailTextView.getMeasuredHeight() + AndroidUtilities.dp(3); + } + super.onMeasure(MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY), h); } public void setInvoice(TLRPC.TL_messageMediaInvoice invoice, String botname) { @@ -107,7 +109,38 @@ public class PaymentInfoCell extends FrameLayout { } else { nameTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 9, 17, 0)); detailTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 33, 17, 0)); - detailExTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 90, 17, 0)); + detailExTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 90, 17, 9)); + imageView.setVisibility(GONE); + } + } + + public void setReceipt(TLRPC.TL_payments_paymentReceipt receipt, String botname) { + nameTextView.setText(receipt.title); + detailTextView.setText(receipt.description); + detailExTextView.setText(botname); + + int maxPhotoWidth; + if (AndroidUtilities.isTablet()) { + maxPhotoWidth = (int) (AndroidUtilities.getMinTabletSide() * 0.7f); + } else { + maxPhotoWidth = (int) (Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) * 0.7f); + } + int width = 640; + int height = 360; + float scale = width / (float) (maxPhotoWidth - AndroidUtilities.dp(2)); + width /= scale; + height /= scale; + if (receipt.photo != null && receipt.photo.mime_type.startsWith("image/")) { + nameTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 10 : 123, 9, LocaleController.isRTL ? 123 : 10, 0)); + detailTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 10 : 123, 33, LocaleController.isRTL ? 123 : 10, 0)); + detailExTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 10 : 123, 90, LocaleController.isRTL ? 123 : 10, 0)); + imageView.setVisibility(VISIBLE); + String filter = String.format(Locale.US, "%d_%d", width, height); + imageView.getImageReceiver().setImage(ImageLocation.getForWebFile(WebFile.createWithWebDocument(receipt.photo)), filter, null, null, -1, null, receipt, 1); + } else { + nameTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 9, 17, 0)); + detailTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 33, 17, 0)); + detailExTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 90, 17, 9)); imageView.setVisibility(GONE); } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java index 1e1381fdf..0b6a00721 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java @@ -501,14 +501,14 @@ public class ProfileSearchCell extends BaseCell { if (user.photo != null) { photo = user.photo.photo_small; } - avatarImage.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, null, user, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user, 0); } } else if (chat != null) { if (chat.photo != null) { photo = chat.photo.photo_small; } avatarDrawable.setInfo(chat); - avatarImage.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, null, chat, 0); + avatarImage.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat, 0); } else { avatarDrawable.setInfo(0, null, null); avatarImage.setImage(null, null, avatarDrawable, null, null, 0); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/SessionCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/SessionCell.java index f45fbb681..1793545f6 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/SessionCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/SessionCell.java @@ -183,7 +183,7 @@ public class SessionCell extends FrameLayout { if (user != null) { avatarDrawable.setInfo(user); name = UserObject.getFirstName(user); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } else { name = ""; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ShareDialogCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ShareDialogCell.java index 43b396b3f..90557001c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ShareDialogCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ShareDialogCell.java @@ -41,58 +41,68 @@ public class ShareDialogCell extends FrameLayout { private CheckBox2 checkBox; private AvatarDrawable avatarDrawable = new AvatarDrawable(); private TLRPC.User user; - private boolean darkTheme; + private int currentType; private float onlineProgress; private long lastUpdateTime; + private long currentDialog; private int currentAccount = UserConfig.selectedAccount; - public ShareDialogCell(Context context, boolean forCall) { + public static final int TYPE_SHARE = 0; + public static final int TYPE_CALL = 1; + public static final int TYPE_CREATE = 2; + + public ShareDialogCell(Context context, int type) { super(context); setWillNotDraw(false); - darkTheme = forCall; + currentType = type; imageView = new BackupImageView(context); imageView.setRoundRadius(AndroidUtilities.dp(28)); - addView(imageView, LayoutHelper.createFrame(56, 56, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 7, 0, 0)); + if (type == TYPE_CREATE) { + addView(imageView, LayoutHelper.createFrame(48, 48, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 7, 0, 0)); + } else { + addView(imageView, LayoutHelper.createFrame(56, 56, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 7, 0, 0)); + } nameTextView = new TextView(context); - nameTextView.setTextColor(Theme.getColor(forCall ? Theme.key_voipgroup_nameText : Theme.key_dialogTextBlack)); + nameTextView.setTextColor(Theme.getColor(type == TYPE_CALL ? Theme.key_voipgroup_nameText : Theme.key_dialogTextBlack)); nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12); nameTextView.setMaxLines(2); nameTextView.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL); nameTextView.setLines(2); nameTextView.setEllipsize(TextUtils.TruncateAt.END); - addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 6, 66, 6, 0)); + addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 6, currentType == TYPE_CREATE ? 58 : 66, 6, 0)); checkBox = new CheckBox2(context, 21); - checkBox.setColor(Theme.key_dialogRoundCheckBox, forCall ? Theme.key_voipgroup_inviteMembersBackground : Theme.key_dialogBackground, Theme.key_dialogRoundCheckBoxCheck); + checkBox.setColor(Theme.key_dialogRoundCheckBox, type == TYPE_CALL ? Theme.key_voipgroup_inviteMembersBackground : Theme.key_dialogBackground, Theme.key_dialogRoundCheckBoxCheck); checkBox.setDrawUnchecked(false); checkBox.setDrawBackgroundAsArc(4); checkBox.setProgressDelegate(progress -> { float scale = 1.0f - (1.0f - 0.857f) * checkBox.getProgress(); imageView.setScaleX(scale); imageView.setScaleY(scale); + invalidate(); }); - addView(checkBox, LayoutHelper.createFrame(24, 24, Gravity.CENTER_HORIZONTAL | Gravity.TOP, 19, 42, 0, 0)); + addView(checkBox, LayoutHelper.createFrame(24, 24, Gravity.CENTER_HORIZONTAL | Gravity.TOP, 19, currentType == TYPE_CREATE ? -40 : 42, 0, 0)); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(103), MeasureSpec.EXACTLY)); + super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(currentType == TYPE_CREATE ? 95 : 103), MeasureSpec.EXACTLY)); } public void setDialog(int uid, boolean checked, CharSequence name) { if (uid > 0) { user = MessagesController.getInstance(currentAccount).getUser(uid); avatarDrawable.setInfo(user); - if (UserObject.isReplyUser(user)) { + if (currentType != TYPE_CREATE && UserObject.isReplyUser(user)) { nameTextView.setText(LocaleController.getString("RepliesTitle", R.string.RepliesTitle)); avatarDrawable.setAvatarType(AvatarDrawable.AVATAR_TYPE_REPLIES); imageView.setImage(null, null, avatarDrawable, user); - } else if (UserObject.isUserSelf(user)) { + } else if (currentType != TYPE_CREATE && UserObject.isUserSelf(user)) { nameTextView.setText(LocaleController.getString("SavedMessages", R.string.SavedMessages)); avatarDrawable.setAvatarType(AvatarDrawable.AVATAR_TYPE_SAVED); imageView.setImage(null, null, avatarDrawable, user); @@ -104,7 +114,7 @@ public class ShareDialogCell extends FrameLayout { } else { nameTextView.setText(""); } - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } else { user = null; @@ -117,11 +127,16 @@ public class ShareDialogCell extends FrameLayout { nameTextView.setText(""); } avatarDrawable.setInfo(chat); - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } + currentDialog = uid; checkBox.setChecked(checked, false); } + public long getCurrentDialog() { + return currentDialog; + } + public void setChecked(boolean checked, boolean animated) { checkBox.setChecked(checked, animated); } @@ -129,7 +144,7 @@ public class ShareDialogCell extends FrameLayout { @Override protected boolean drawChild(Canvas canvas, View child, long drawingTime) { boolean result = super.drawChild(canvas, child, drawingTime); - if (child == imageView) { + if (child == imageView && currentType != TYPE_CREATE) { if (user != null && !MessagesController.isSupportUser(user)) { long newTime = SystemClock.elapsedRealtime(); long dt = newTime - lastUpdateTime; @@ -142,7 +157,7 @@ public class ShareDialogCell extends FrameLayout { if (isOnline || onlineProgress != 0) { int top = imageView.getBottom() - AndroidUtilities.dp(6); int left = imageView.getRight() - AndroidUtilities.dp(10); - Theme.dialogs_onlineCirclePaint.setColor(Theme.getColor(darkTheme ? Theme.key_voipgroup_inviteMembersBackground : Theme.key_windowBackgroundWhite)); + Theme.dialogs_onlineCirclePaint.setColor(Theme.getColor(currentType == TYPE_CALL ? Theme.key_voipgroup_inviteMembersBackground : Theme.key_windowBackgroundWhite)); canvas.drawCircle(left, top, AndroidUtilities.dp(7) * onlineProgress, Theme.dialogs_onlineCirclePaint); Theme.dialogs_onlineCirclePaint.setColor(Theme.getColor(Theme.key_chats_onlineCircle)); canvas.drawCircle(left, top, AndroidUtilities.dp(5) * onlineProgress, Theme.dialogs_onlineCirclePaint); @@ -177,6 +192,6 @@ public class ShareDialogCell extends FrameLayout { int cy = imageView.getTop() + imageView.getMeasuredHeight() / 2; Theme.checkboxSquare_checkPaint.setColor(Theme.getColor(Theme.key_dialogRoundCheckBox)); Theme.checkboxSquare_checkPaint.setAlpha((int) (checkBox.getProgress() * 255)); - canvas.drawCircle(cx, cy, AndroidUtilities.dp(28), Theme.checkboxSquare_checkPaint); + canvas.drawCircle(cx, cy, AndroidUtilities.dp(24), Theme.checkboxSquare_checkPaint); } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/SharingLiveLocationCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/SharingLiveLocationCell.java index acaa813a0..aabcfacc4 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/SharingLiveLocationCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/SharingLiveLocationCell.java @@ -124,14 +124,14 @@ public class SharingLiveLocationCell extends FrameLayout { if (user != null) { avatarDrawable = new AvatarDrawable(user); name = UserObject.getUserName(user); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } else { TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-lowerId); if (chat != null) { avatarDrawable = new AvatarDrawable(chat); name = chat.title; - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } nameTextView.setText(name); @@ -177,14 +177,14 @@ public class SharingLiveLocationCell extends FrameLayout { if (user != null) { avatarDrawable = new AvatarDrawable(user); name = UserObject.getUserName(user); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } else { TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-fromId); if (chat != null) { avatarDrawable = new AvatarDrawable(chat); name = chat.title; - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } } @@ -216,14 +216,14 @@ public class SharingLiveLocationCell extends FrameLayout { if (user != null) { avatarDrawable.setInfo(user); nameTextView.setText(ContactsController.formatName(user.first_name, user.last_name)); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } else { TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-lower_id); if (chat != null) { avatarDrawable.setInfo(chat); nameTextView.setText(chat.title); - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } @@ -249,14 +249,14 @@ public class SharingLiveLocationCell extends FrameLayout { if (user != null) { avatarDrawable.setInfo(user); nameTextView.setText(ContactsController.formatName(user.first_name, user.last_name)); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } else { TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-lower_id); if (chat != null) { avatarDrawable.setInfo(chat); nameTextView.setText(chat.title); - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/StatisticPostInfoCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/StatisticPostInfoCell.java index e66fd1887..cbc76b726 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/StatisticPostInfoCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/StatisticPostInfoCell.java @@ -113,7 +113,7 @@ public class StatisticPostInfoCell extends FrameLayout { public void setData(StatisticActivity.MemberData memberData) { avatarDrawable.setInfo(memberData.user); - imageView.setImage(ImageLocation.getForUser(memberData.user, false), "50_50", avatarDrawable, memberData.user); + imageView.setImage(ImageLocation.getForUserOrChat(memberData.user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(memberData.user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, memberData.user); imageView.setRoundRadius(AndroidUtilities.dp(46) >> 1); message.setText(memberData.user.first_name); date.setText(memberData.description); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java index 7fe3538c9..68f59d26b 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java @@ -493,9 +493,9 @@ public class UserCell extends FrameLayout { lastAvatar = photo; if (currentUser != null) { - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } else if (currentChat != null) { - avatarImageView.setImage(ImageLocation.getForChat(currentChat, false), "50_50", avatarDrawable, currentChat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentChat); } else { avatarImageView.setImageDrawable(avatarDrawable); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell2.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell2.java index 86c747fd1..8bfb329a0 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell2.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell2.java @@ -260,7 +260,7 @@ public class UserCell2 extends FrameLayout { statusTextView.setText(LocaleController.formatUserStatus(currentAccount, currentUser)); } } - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } else if (currentChat != null) { statusTextView.setTextColor(statusColor); if (ChatObject.isChannel(currentChat) && !currentChat.megagroup) { @@ -282,7 +282,7 @@ public class UserCell2 extends FrameLayout { statusTextView.setText(LocaleController.getString("MegaPublic", R.string.MegaPublic)); } } - avatarImageView.setImage(ImageLocation.getForChat(currentChat, false), "50_50", avatarDrawable, currentObject); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentObject); } else { avatarImageView.setImageDrawable(avatarDrawable); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChangePhoneActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChangePhoneActivity.java index b8733a762..375847929 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChangePhoneActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChangePhoneActivity.java @@ -27,6 +27,7 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.graphics.drawable.Drawable; +import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.telephony.PhoneNumberUtils; @@ -981,8 +982,8 @@ public class ChangePhoneActivity extends BaseFragment { PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0); String version = String.format(Locale.US, "%s (%d)", pInfo.versionName, pInfo.versionCode); - Intent mailer = new Intent(Intent.ACTION_SEND); - mailer.setType("message/rfc822"); + Intent mailer = new Intent(Intent.ACTION_SENDTO); + mailer.setData(Uri.parse("mailto:")); mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@stel.com"}); mailer.putExtra(Intent.EXTRA_SUBJECT, "Android registration/login issue " + version + " " + emailPhone); mailer.putExtra(Intent.EXTRA_TEXT, "Phone: " + requestPhone + "\nApp version: " + version + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault() + "\nError: " + lastError); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java index 0ed2568ea..085368ecf 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java @@ -2754,7 +2754,7 @@ public class ChannelAdminLogActivity extends BaseFragment implements Notificatio themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[]{ChatActionCell.class}, Theme.chat_actionTextPaint, null, null, Theme.key_chat_serviceText)); themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[]{ChatActionCell.class}, Theme.chat_actionTextPaint, null, null, Theme.key_chat_serviceLink)); - themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class}, null, new Drawable[]{Theme.chat_shareIconDrawable, Theme.chat_botInlineDrawable, Theme.chat_botLinkDrawalbe, Theme.chat_goIconDrawable, Theme.chat_commentStickerDrawable}, null, Theme.key_chat_serviceIcon)); + themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class}, null, new Drawable[]{Theme.chat_botCardDrawalbe, Theme.chat_shareIconDrawable, Theme.chat_botInlineDrawable, Theme.chat_botLinkDrawalbe, Theme.chat_goIconDrawable, Theme.chat_commentStickerDrawable}, null, Theme.key_chat_serviceIcon)); themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class, ChatActionCell.class}, null, null, null, Theme.key_chat_serviceBackground)); themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class, ChatActionCell.class}, null, null, null, Theme.key_chat_serviceBackgroundSelected)); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java index 203d005f3..470a6c109 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java @@ -1003,7 +1003,7 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC bundle.putInt("chat_id", chat_id); bundle.putBoolean("canCreatePublic", canCreatePublic); if (inputPhoto != null || inputVideo != null) { - MessagesController.getInstance(currentAccount).changeChatAvatar(chat_id, null, inputPhoto, inputVideo, videoTimestamp, inputVideoPath, avatar, avatarBig); + MessagesController.getInstance(currentAccount).changeChatAvatar(chat_id, null, inputPhoto, inputVideo, videoTimestamp, inputVideoPath, avatar, avatarBig, null); } presentFragment(new ChannelCreateActivity(bundle), true); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 1fe23d464..e5f01c9fc 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -737,6 +737,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not private boolean invalidateMessagesVisiblePart; private boolean scrollByTouch; + private PinchToZoomHelper pinchToZoomHelper; + public float getChatListViewPadding() { return chatListViewPaddingTop; } @@ -1666,6 +1668,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (chatListItemAnimator != null) { chatListItemAnimator.onDestroy(); } + if (pinchToZoomHelper != null) { + pinchToZoomHelper.clear(); + } } @Override @@ -1824,7 +1829,19 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not alert.setDelegate(new ClearHistoryAlert.ClearHistoryAlertDelegate() { @Override public void onClearHistory(boolean revoke) { - performHistoryClear(revoke); + if (revoke && currentUser != null) { + getMessagesStorage().getMessagesCount(currentUser.id, (count) -> { + if (count >= 50) { + AlertsCreator.createClearOrDeleteDialogAlert(ChatActivity.this, true, false, true, null, currentUser, false, false, (param) -> { + performHistoryClear(true); + }); + } else { + performHistoryClear(true); + } + }); + } else { + performHistoryClear(revoke); + } } @Override @@ -1960,6 +1977,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not avatarContainer.onDestroy(); } avatarContainer = new ChatAvatarContainer(context, this, currentEncryptedChat != null); + AndroidUtilities.updateViewVisibilityAnimated(avatarContainer, true, 1f, false); if (inPreviewMode || inBubbleMode) { avatarContainer.setOccupyStatusBar(false); } @@ -2401,6 +2419,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } } + if (pinchToZoomHelper.isInOverlayMode()) { + return pinchToZoomHelper.onTouchEvent(ev); + } + if (AvatarPreviewer.hasVisibleInstance()) { AvatarPreviewer.getInstance().onTouchEvent(ev); return true; @@ -5566,6 +5588,26 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not return; } TLRPC.BotInlineResult result = (TLRPC.BotInlineResult) object; + if (currentEncryptedChat != null) { + int error = 0; + if (result.send_message instanceof TLRPC.TL_botInlineMessageMediaAuto && "game".equals(result.type)) { + error = 1; + } else if (result.send_message instanceof TLRPC.TL_botInlineMessageMediaInvoice) { + error = 2; + } + if (error != 0) { + AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); + builder.setTitle(LocaleController.getString("SendMessageTitle", R.string.SendMessageTitle)); + if (error == 1) { + builder.setMessage(LocaleController.getString("GameCantSendSecretChat", R.string.GameCantSendSecretChat)); + } else { + builder.setMessage(LocaleController.getString("InvoiceCantSendSecretChat", R.string.InvoiceCantSendSecretChat)); + } + builder.setNegativeButton(LocaleController.getString("OK", R.string.OK), null); + showDialog(builder.create()); + return; + } + } if ((result.type.equals("photo") && (result.photo != null || result.content != null) || result.type.equals("gif") && (result.document != null || result.content != null) || result.type.equals("video") && (result.document != null/* || result.content_url != null*/))) { @@ -5743,7 +5785,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } }); - topUndoView = new UndoView(context, true) { + topUndoView = new UndoView(context, this, true) { @Override public void didPressUrl(CharacterStyle span) { didPressMessageUrl(span, false, null, null); @@ -6362,10 +6404,15 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not replyLayout.setOnClickListener(v -> { if (forwardingMessages != null && !forwardingMessages.isEmpty()) { int hasPoll = 0; + boolean hasInvoice = false; for (int a = 0, N = forwardingMessages.size(); a < N; a++) { MessageObject messageObject = forwardingMessages.get(a); - if (hasPoll != 2 && messageObject.isPoll()) { - hasPoll = messageObject.isPublicPoll() ? 2 : 1; + if (messageObject.isPoll()) { + if (hasPoll != 2) { + hasPoll = messageObject.isPublicPoll() ? 2 : 1; + } + } else if (messageObject.isInvoice()) { + hasInvoice = true; } selectedMessagesIds[0].put(messageObject.getId(), messageObject); } @@ -6373,6 +6420,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not args.putBoolean("onlySelect", true); args.putInt("dialogsType", 3); args.putInt("hasPoll", hasPoll); + args.putBoolean("hasInvoice", hasInvoice); args.putInt("messagesCount", forwardingMessages.size()); DialogsActivity fragment = new DialogsActivity(args); fragment.setDelegate(ChatActivity.this); @@ -6422,10 +6470,15 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not builder.setNegativeButton(LocaleController.getString("SelectOtherChat", R.string.SelectOtherChat), (dialogInterface, i) -> { if (forwardingMessages != null && !forwardingMessages.isEmpty()) { int hasPoll = 0; + boolean hasInvoice = false; for (int a = 0, N = forwardingMessages.size(); a < N; a++) { MessageObject messageObject = forwardingMessages.get(a); - if (hasPoll != 2 && messageObject.isPoll()) { - hasPoll = messageObject.isPublicPoll() ? 2 : 1; + if (messageObject.isPoll()) { + if (hasPoll != 2) { + hasPoll = messageObject.isPublicPoll() ? 2 : 1; + } + } else if (messageObject.isInvoice()) { + hasInvoice = true; } selectedMessagesIds[0].put(messageObject.getId(), messageObject); } @@ -6433,6 +6486,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not args.putBoolean("onlySelect", true); args.putInt("dialogsType", 3); args.putInt("hasPoll", hasPoll); + args.putBoolean("hasInvoice", hasInvoice); args.putInt("messagesCount", forwardingMessages.size()); DialogsActivity fragment = new DialogsActivity(args); fragment.setDelegate(ChatActivity.this); @@ -6911,7 +6965,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not contentView.addView(searchContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 51, Gravity.BOTTOM)); - undoView = new UndoView(context); + undoView = new UndoView(context, this); undoView.setAdditionalTranslationY(AndroidUtilities.dp(51)); contentView.addView(undoView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.LEFT, 8, 0, 8, 8)); @@ -7006,6 +7060,109 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (replyingMessageObject != null) { chatActivityEnterView.setReplyingMessageObject(replyingMessageObject); } + + ViewGroup decorView; + if (Build.VERSION.SDK_INT >= 21) { + decorView = (ViewGroup) getParentActivity().getWindow().getDecorView(); + } else { + decorView = contentView; + } + pinchToZoomHelper = new PinchToZoomHelper(decorView) { + @Override + protected void drawOverlays(Canvas canvas, float alpha, float parentOffsetX, float parentOffsetY, float clipTop, float clipBottom) { + if (alpha > 0) { + View view = getChild(); + if (view instanceof ChatMessageCell) { + ChatMessageCell cell = (ChatMessageCell) view; + + int top = (int) Math.max(clipTop, parentOffsetY); + int bottom = (int) Math.min(clipBottom, parentOffsetY + cell.getMeasuredHeight()); + AndroidUtilities.rectTmp.set(parentOffsetX, top, parentOffsetX + cell.getMeasuredWidth(), bottom); + canvas.saveLayerAlpha(AndroidUtilities.rectTmp, (int) (255 * alpha), Canvas.ALL_SAVE_FLAG); + canvas.translate(parentOffsetX, parentOffsetY); + cell.drawFromPinchToZoom = true; + cell.drawOverlays(canvas); + if (cell.shouldDrawTimeOnMedia() && cell.getCurrentMessagesGroup() == null) { + cell.drawTime(canvas, 1f, false); + } + cell.drawFromPinchToZoom = false; + canvas.restore(); + } + } + } + }; + pinchToZoomHelper.setCallback(new PinchToZoomHelper.Callback() { + + @Override + public TextureView getCurrentTextureView() { + return videoTextureView; + } + + @Override + public void onZoomStarted(MessageObject messageObject) { + chatListView.cancelClickRunnables(true); + chatListView.stopScroll(); + if (MediaController.getInstance().isPlayingMessage(messageObject)) { + contentView.removeView(videoPlayerContainer); + videoPlayerContainer = null; + videoTextureView = null; + aspectRatioFrameLayout = null; + } + + for (int i = 0; i < chatListView.getChildCount(); i++) { + if (chatListView.getChildAt(i) instanceof ChatMessageCell) { + ChatMessageCell cell = (ChatMessageCell) chatListView.getChildAt(i); + if (cell.getMessageObject().getId() == messageObject.getId()) { + cell.getPhotoImage().setVisible(false, true); + } + } + } + } + + @Override + public void onZoomFinished(MessageObject messageObject) { + if (messageObject == null) { + return; + } + if (MediaController.getInstance().isPlayingMessage(messageObject)) { + for (int i = 0; i < chatListView.getChildCount(); i++) { + if (chatListView.getChildAt(i) instanceof ChatMessageCell) { + ChatMessageCell cell = (ChatMessageCell) chatListView.getChildAt(i); + if (cell.getMessageObject().getId() == messageObject.getId()) { + AnimatedFileDrawable animation = cell.getPhotoImage().getAnimation(); + if (animation.isRunning()) { + animation.stop(); + } + if (animation != null) { + Bitmap bitmap = animation.getAnimatedBitmap(); + if (bitmap != null) { + try { + Bitmap src = pinchToZoomHelper.getVideoBitmap(bitmap.getWidth(), bitmap.getHeight()); + Canvas canvas = new Canvas(bitmap); + canvas.drawBitmap(src, 0, 0, null); + src.recycle(); + } catch (Throwable e) { + FileLog.e(e); + } + } + } + } + } + } + createTextureView(true); + MediaController.getInstance().setTextureView(videoTextureView, aspectRatioFrameLayout, videoPlayerContainer, true); + } + chatListView.invalidate(); + } + + }); + pinchToZoomHelper.setClipBoundsListener(new PinchToZoomHelper.ClipBoundsListener() { + @Override + public void getClipTopBottom(float[] topBottom) { + topBottom[1] = chatListView.getBottom(); + topBottom[0] = chatListView.getTop() + chatListViewPaddingTop - AndroidUtilities.dp(4); + } + }); return fragmentView; } @@ -7597,6 +7754,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not private void openForward() { int hasPoll = 0; + boolean hasInvoice = false; for (int a = 0; a < 2; a++) { for (int b = 0; b < selectedMessagesIds[a].size(); b++) { MessageObject messageObject = selectedMessagesIds[a].valueAt(b); @@ -7605,6 +7763,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (hasPoll == 2) { break; } + } else if (messageObject.isInvoice()) { + hasInvoice = true; } } if (hasPoll == 2) { @@ -7616,6 +7776,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not args.putInt("dialogsType", 3); args.putInt("messagesCount", canForwardMessagesCount); args.putInt("hasPoll", hasPoll); + args.putBoolean("hasInvoice", hasInvoice); DialogsActivity fragment = new DialogsActivity(args); fragment.setDelegate(ChatActivity.this); presentFragment(fragment); @@ -7851,7 +8012,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not return; } if (chatAttachAlert == null) { - chatAttachAlert = new ChatAttachAlert(getParentActivity(), this) { + chatAttachAlert = new ChatAttachAlert(getParentActivity(), this, false) { @Override public void dismissInternal() { if (chatAttachAlert.isShowing()) { @@ -9805,7 +9966,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } private void moveScrollToLastMessage() { - if (chatListView != null && !messages.isEmpty()) { + if (chatListView != null && !messages.isEmpty() && !pinchToZoomHelper.isInOverlayMode()) { chatLayoutManager.scrollToPositionWithOffset(0, 0); chatListView.stopScroll(); } @@ -18050,11 +18211,13 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not return; } - MessageObject message = null; + MessageObject message; if (v instanceof ChatMessageCell) { message = ((ChatMessageCell) v).getMessageObject(); } else if (v instanceof ChatActionCell) { message = ((ChatActionCell) v).getMessageObject(); + } else { + message = null; } if (message == null) { return; @@ -18072,7 +18235,17 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (avatarContainer.openSetTimer()) { return; } - } else if (message.messageOwner.action instanceof TLRPC.TL_messageActionGroupCall || message.messageOwner.action instanceof TLRPC.TL_messageActionInviteToGroupCall) { + } else if (message.messageOwner.action instanceof TLRPC.TL_messageActionPaymentSent && message.replyMessageObject != null && message.replyMessageObject.isInvoice()) { + TLRPC.TL_payments_getPaymentReceipt req = new TLRPC.TL_payments_getPaymentReceipt(); + req.msg_id = message.getId(); + req.peer = getMessagesController().getInputPeer(message.messageOwner.peer_id); + getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> { + if (response instanceof TLRPC.TL_payments_paymentReceipt) { + presentFragment(new PaymentFormActivity((TLRPC.TL_payments_paymentReceipt) response)); + } + }), ConnectionsManager.RequestFlagFailOnServerErrors); + return; + } else if (message.messageOwner.action instanceof TLRPC.TL_messageActionGroupCall || message.messageOwner.action instanceof TLRPC.TL_messageActionInviteToGroupCall || message.messageOwner.action instanceof TLRPC.TL_messageActionGroupCallScheduled) { if (getParentActivity() == null) { return; } @@ -18080,7 +18253,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (sharedInstance != null) { if (sharedInstance.groupCall != null && message.messageOwner.action.call.id == sharedInstance.groupCall.call.id) { if (getParentActivity() instanceof LaunchActivity) { - GroupCallActivity.create((LaunchActivity) getParentActivity(), AccountInstance.getInstance(currentAccount)); + GroupCallActivity.create((LaunchActivity) getParentActivity(), AccountInstance.getInstance(currentAccount), null, null, false, null); } else { Intent intent = new Intent(getParentActivity(), LaunchActivity.class).setAction("voip_chat"); intent.putExtra("currentAccount", VoIPService.getSharedInstance().getAccount()); @@ -18093,7 +18266,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not return; } else if (fragmentContextView != null && getGroupCall() != null) { if (VoIPService.getSharedInstance() != null) { - GroupCallActivity.create((LaunchActivity) getParentActivity(), AccountInstance.getInstance(VoIPService.getSharedInstance().getAccount())); + GroupCallActivity.create((LaunchActivity) getParentActivity(), AccountInstance.getInstance(VoIPService.getSharedInstance().getAccount()), null, null, false, null); } else { ChatObject.Call call = getGroupCall(); if (call == null) { @@ -19077,6 +19250,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not args.putInt("dialogsType", 3); args.putInt("messagesCount", forwardingMessageGroup == null ? 1 : forwardingMessageGroup.messages.size()); args.putInt("hasPoll", forwardingMessage.isPoll() ? (forwardingMessage.isPublicPoll() ? 2 : 1) : 0); + args.putBoolean("hasInvoice", forwardingMessage.isInvoice()); DialogsActivity fragment = new DialogsActivity(args); fragment.setDelegate(this); presentFragment(fragment); @@ -21550,6 +21724,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not fireworksOverlay.start(); fireworksOverlay.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); } + + @Override + public PinchToZoomHelper getPinchToZoomHelper() { + return pinchToZoomHelper; + } }); if (currentEncryptedChat == null) { chatMessageCell.setAllowAssistant(true); @@ -22406,6 +22585,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not public void onStartAnimation() { super.onStartAnimation(); scrollCallbackAnimationIndex = getNotificationCenter().setAnimationInProgress(scrollCallbackAnimationIndex, allowedNotificationsDuringChatListAnimations); + if (pinchToZoomHelper.isInOverlayMode()) { + pinchToZoomHelper.finishZoom(); + } } @Override @@ -22562,7 +22744,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[]{ChatActionCell.class}, Theme.chat_actionTextPaint, null, null, Theme.key_chat_serviceText)); themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[]{ChatActionCell.class}, Theme.chat_actionTextPaint, null, null, Theme.key_chat_serviceLink)); - themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class}, null, new Drawable[]{Theme.chat_shareIconDrawable, Theme.chat_replyIconDrawable, Theme.chat_botInlineDrawable, Theme.chat_botLinkDrawalbe, Theme.chat_goIconDrawable, Theme.chat_commentStickerDrawable}, null, Theme.key_chat_serviceIcon)); + themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class}, null, new Drawable[]{Theme.chat_botCardDrawalbe, Theme.chat_shareIconDrawable, Theme.chat_replyIconDrawable, Theme.chat_botInlineDrawable, Theme.chat_botLinkDrawalbe, Theme.chat_goIconDrawable, Theme.chat_commentStickerDrawable}, null, Theme.key_chat_serviceIcon)); themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class, ChatActionCell.class}, null, null, null, Theme.key_chat_serviceBackground)); themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[]{ChatMessageCell.class, ChatActionCell.class}, null, null, null, Theme.key_chat_serviceBackgroundSelected)); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java index 9e065c7d6..490ef9351 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java @@ -584,7 +584,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image setAvatarCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton); setAvatarCell.setOnClickListener(v -> imageUpdater.openMenu(avatar != null, () -> { avatar = null; - MessagesController.getInstance(currentAccount).changeChatAvatar(chatId, null, null, null, 0, null, null, null); + MessagesController.getInstance(currentAccount).changeChatAvatar(chatId, null, null, null, 0, null, null, null, null); showAvatarProgress(false, true); avatarImage.setImage(null, null, avatarDrawable, currentChat); }, null)); @@ -775,7 +775,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image blockCell = new TextCell(context); blockCell.setBackgroundDrawable(Theme.getSelectorDrawable(false)); - blockCell.setVisibility(ChatObject.isChannel(currentChat) || currentChat.creator ? View.VISIBLE : View.GONE); + blockCell.setVisibility(ChatObject.isChannel(currentChat) || currentChat.creator || ChatObject.hasAdminRights(currentChat) && ChatObject.canChangeChatInfo(currentChat) ? View.VISIBLE : View.GONE); blockCell.setOnClickListener(v -> { Bundle args = new Bundle(); args.putInt("chat_id", chatId); @@ -937,8 +937,8 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image boolean hasPhoto; if (currentChat.photo != null) { avatar = currentChat.photo.photo_small; - ImageLocation location = ImageLocation.getForChat(currentChat, false); - avatarImage.setImage(location, "50_50", avatarDrawable, currentChat); + ImageLocation location = ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL); + avatarImage.setImage(location, "50_50", ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentChat); hasPhoto = location != null; } else { avatarImage.setImageDrawable(avatarDrawable); @@ -1001,7 +1001,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image AndroidUtilities.runOnUIThread(() -> { avatar = smallSize.location; if (photo != null || video != null) { - MessagesController.getInstance(currentAccount).changeChatAvatar(chatId, null, photo, video, videoStartTimestamp, videoPath, smallSize.location, bigSize.location); + MessagesController.getInstance(currentAccount).changeChatAvatar(chatId, null, photo, video, videoStartTimestamp, videoPath, smallSize.location, bigSize.location, null); if (createAfterUpload) { try { if (progressDialog != null && progressDialog.isShowing()) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatLinkActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatLinkActivity.java index 9ade21d3a..08f7c6873 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatLinkActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatLinkActivity.java @@ -499,7 +499,7 @@ public class ChatLinkActivity extends BaseFragment implements NotificationCenter frameLayout2.addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, (LocaleController.isRTL ? 21 : 76), 11, (LocaleController.isRTL ? 76 : 21), 0)); frameLayout2.addView(messageTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 24, 57, 24, 9)); avatarDrawable.setInfo(chat); - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); builder.setPositiveButton(LocaleController.getString("DiscussionLinkGroup", R.string.DiscussionLinkGroup), (dialogInterface, i) -> { if (chatFull.hidden_prehistory) { MessagesController.getInstance(currentAccount).toogleChannelInvitesHistory(chat.id, false); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java index 18584bfff..02243691d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java @@ -514,7 +514,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente if (slowmodeInfoRow == -1 && gigaHeaderRow == -1 || removedUsersRow != -1) { participantsDividerRow = rowCount++; } - if (ChatObject.canBlockUsers(currentChat)) { + if (ChatObject.canBlockUsers(currentChat) && (ChatObject.isChannel(currentChat) || currentChat.creator)) { addNewRow = rowCount++; } @@ -726,6 +726,9 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente } else { searchItem.setSearchFieldHint(LocaleController.getString("Search", R.string.Search)); } + if (!(ChatObject.isChannel(currentChat) || currentChat.creator)) { + searchItem.setVisibility(View.GONE); + } if (type == TYPE_KICKED) { doneItem = menu.addItemWithWidth(done_button, R.drawable.ic_done, AndroidUtilities.dp(56), LocaleController.getString("Done", R.string.Done)); @@ -2109,7 +2112,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente if (type != TYPE_KICKED) { return; } - if (!ChatObject.isChannel(currentChat) && selectedSlowmode != initialSlowmode && info != null) { + if (currentChat.creator && !ChatObject.isChannel(currentChat) && selectedSlowmode != initialSlowmode && info != null) { MessagesController.getInstance(currentAccount).convertToMegaGroup(getParentActivity(), chatId, this, param -> { if (param != 0) { chatId = param; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/AlertsCreator.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/AlertsCreator.java index a573767a1..08a786a04 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/AlertsCreator.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/AlertsCreator.java @@ -28,22 +28,28 @@ import android.os.Build; import android.os.Bundle; import android.os.Vibrator; import android.provider.Settings; +import android.text.Editable; import android.text.Html; +import android.text.InputFilter; import android.text.InputType; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; +import android.text.Spanned; import android.text.TextUtils; +import android.text.TextWatcher; import android.text.style.URLSpan; import android.util.Base64; import android.util.SparseArray; import android.util.TypedValue; import android.view.Gravity; import android.view.HapticFeedbackConstants; +import android.view.KeyEvent; import android.view.View; import android.view.ViewOutlineProvider; import android.view.inputmethod.EditorInfo; import android.widget.Button; +import android.widget.EditText; import android.widget.FrameLayout; import android.widget.LinearLayout; import android.widget.TextView; @@ -89,6 +95,7 @@ import org.telegram.ui.ChatActivity; import org.telegram.ui.Components.voip.VoIPHelper; import org.telegram.ui.LanguageSelectActivity; import org.telegram.ui.LaunchActivity; +import org.telegram.ui.LoginActivity; import org.telegram.ui.NotificationsCustomSettingsActivity; import org.telegram.ui.NotificationsSettingsActivity; import org.telegram.ui.ProfileNotificationsActivity; @@ -285,7 +292,7 @@ public class AlertsCreator { } } else if (request instanceof TLRPC.TL_account_sendChangePhoneCode) { if (error.text.contains("PHONE_NUMBER_INVALID")) { - showSimpleAlert(fragment, LocaleController.getString("InvalidPhoneNumber", R.string.InvalidPhoneNumber)); + LoginActivity.needShowInvalidAlert(fragment, (String) args[0], false); } else if (error.text.contains("PHONE_CODE_EMPTY") || error.text.contains("PHONE_CODE_INVALID")) { showSimpleAlert(fragment, LocaleController.getString("InvalidCode", R.string.InvalidCode)); } else if (error.text.contains("PHONE_CODE_EXPIRED")) { @@ -294,6 +301,8 @@ public class AlertsCreator { showSimpleAlert(fragment, LocaleController.getString("FloodWait", R.string.FloodWait)); } else if (error.text.startsWith("PHONE_NUMBER_OCCUPIED")) { showSimpleAlert(fragment, LocaleController.formatString("ChangePhoneNumberOccupied", R.string.ChangePhoneNumberOccupied, args[0])); + } else if (error.text.startsWith("PHONE_NUMBER_BANNED")) { + LoginActivity.needShowInvalidAlert(fragment, (String) args[0], true); } else { showSimpleAlert(fragment, LocaleController.getString("ErrorOccurred", R.string.ErrorOccurred)); } @@ -837,10 +846,26 @@ public class AlertsCreator { } } } + if (callback != null) { callback.run(i); } builder.getDismissRunnable().run(); + int setting = -1; + if (i == 0) { + setting = NotificationsController.SETTING_MUTE_UNMUTE; + } else if (i == 1) { + setting = NotificationsController.SETTING_MUTE_HOUR; + } else if (i == 2) { + setting = NotificationsController.SETTING_MUTE_2_DAYS; + } else if (i == 4){ + setting = NotificationsController.SETTING_MUTE_FOREVER; + } + if (setting >= 0) { + if (BulletinFactory.canShowBulletin(parentFragment)) { + BulletinFactory.createMuteBulletin(parentFragment, setting).show(); + } + } }); } builder.setTitle(LocaleController.getString("Notifications", R.string.Notifications)); @@ -1136,11 +1161,11 @@ public class AlertsCreator { } else { avatarDrawable.setSmallSize(false); avatarDrawable.setInfo(user); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } else { avatarDrawable.setInfo(chat); - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } messageTextView.setText(AndroidUtilities.replaceTags(message)); @@ -1304,11 +1329,11 @@ public class AlertsCreator { } else { avatarDrawable.setSmallSize(false); avatarDrawable.setInfo(user); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } else { avatarDrawable.setInfo(chat); - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } if (second) { @@ -1474,7 +1499,7 @@ public class AlertsCreator { BackupImageView imageView = new BackupImageView(context); imageView.setRoundRadius(AndroidUtilities.dp(20)); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); frameLayout.addView(imageView, LayoutHelper.createFrame(40, 40, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 22, 5, 22, 0)); TextView textView = new TextView(context); @@ -1500,6 +1525,292 @@ public class AlertsCreator { fragment.showDialog(dialog); } + public static void createChangeBioAlert(String currentBio, int peerId, Context context, int currentAccount) { + AlertDialog.Builder builder = new AlertDialog.Builder(context); + builder.setTitle(peerId > 0 ? LocaleController.getString("UserBio", R.string.UserBio) : LocaleController.getString("DescriptionPlaceholder", R.string.DescriptionPlaceholder)); + builder.setMessage(peerId > 0 ? LocaleController.getString("VoipGroupBioEditAlertText", R.string.VoipGroupBioEditAlertText) : LocaleController.getString("DescriptionInfo", R.string.DescriptionInfo)); + FrameLayout dialogView = new FrameLayout(context); + dialogView.setClipChildren(false); + + if (peerId < 0) { + TLRPC.ChatFull chatFull = MessagesController.getInstance(currentAccount).getChatFull(-peerId); + if (chatFull == null) { + MessagesController.getInstance(currentAccount).loadFullChat(-peerId, ConnectionsManager.generateClassGuid(), true); + } + } + + NumberTextView checkTextView = new NumberTextView(context); + EditText editTextView = new EditText(context); + editTextView.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); + editTextView.setHint(peerId > 0 ? LocaleController.getString("UserBio", R.string.UserBio) : LocaleController.getString("DescriptionPlaceholder", R.string.DescriptionPlaceholder)); + editTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); + editTextView.setBackground(Theme.createEditTextDrawable(context, true)); + + editTextView.setMaxLines(4); + editTextView.setRawInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_MULTI_LINE); + editTextView.setImeOptions(EditorInfo.IME_ACTION_DONE); + + InputFilter[] inputFilters = new InputFilter[1]; + int maxSymbolsCount = peerId > 0 ? 70 : 255; + inputFilters[0] = new CodepointsLengthInputFilter(maxSymbolsCount) { + @Override + public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { + CharSequence result = super.filter(source, start, end, dest, dstart, dend); + if (result != null && source != null && result.length() != source.length()) { + Vibrator v = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); + if (v != null) { + v.vibrate(200); + } + AndroidUtilities.shakeView(checkTextView, 2, 0); + } + return result; + } + }; + editTextView.setFilters(inputFilters); + + checkTextView.setCenterAlign(true); + checkTextView.setTextSize(15); + checkTextView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText4)); + checkTextView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); + dialogView.addView(checkTextView, LayoutHelper.createFrame(20, 20, LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT, 0, 14, 21, 0)); + editTextView.setPadding(LocaleController.isRTL ? AndroidUtilities.dp(24) : 0, AndroidUtilities.dp(8), LocaleController.isRTL ? 0 : AndroidUtilities.dp(24), AndroidUtilities.dp(8)); + editTextView.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { + + } + + @Override + public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { + + } + + @Override + public void afterTextChanged(Editable s) { + int count = maxSymbolsCount - Character.codePointCount(s, 0, s.length()); + if (count < 30) { + checkTextView.setNumber(count, checkTextView.getVisibility() == View.VISIBLE); + AndroidUtilities.updateViewVisibilityAnimated(checkTextView, true); + } else { + AndroidUtilities.updateViewVisibilityAnimated(checkTextView, false); + } + } + }); + AndroidUtilities.updateViewVisibilityAnimated(checkTextView, false, 0, false); + editTextView.setText(currentBio); + editTextView.setSelection(editTextView.getText().toString().length()); + + builder.setView(dialogView); + DialogInterface.OnClickListener onDoneListener = (dialogInterface, i) -> { + if (peerId > 0) { + final TLRPC.UserFull userFull = MessagesController.getInstance(currentAccount).getUserFull(UserConfig.getInstance(currentAccount).getClientUserId()); + final String newName = editTextView.getText().toString().replace("\n", " ").replaceAll(" +", " ").trim(); + if (userFull != null) { + String currentName = userFull.about; + if (currentName == null) { + currentName = ""; + } + if (currentName.equals(newName)) { + AndroidUtilities.hideKeyboard(editTextView); + dialogInterface.dismiss(); + return; + } + userFull.about = newName; + NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.userInfoDidLoad, peerId, userFull); + } + + final TLRPC.TL_account_updateProfile req = new TLRPC.TL_account_updateProfile(); + req.about = newName; + req.flags |= 4; + NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.showBulletin, Bulletin.TYPE_BIO_CHANGED, peerId); + ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> { + + }, ConnectionsManager.RequestFlagFailOnServerErrors); + } else { + TLRPC.ChatFull chatFull = MessagesController.getInstance(currentAccount).getChatFull(-peerId); + final String newAbout = editTextView.getText().toString(); + if (chatFull != null) { + String currentName = chatFull.about; + if (currentName == null) { + currentName = ""; + } + if (currentName.equals(newAbout)) { + AndroidUtilities.hideKeyboard(editTextView); + dialogInterface.dismiss(); + return; + } + chatFull.about = newAbout; + NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.chatInfoDidLoad, chatFull, 0, false, false); + } + NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.showBulletin, Bulletin.TYPE_BIO_CHANGED, peerId); + MessagesController.getInstance(currentAccount).updateChatAbout(-peerId, newAbout, chatFull); + } + dialogInterface.dismiss(); + }; + builder.setPositiveButton(LocaleController.getString("Save", R.string.Save), onDoneListener); + builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); + builder.setOnPreDismissListener(dialogInterface -> AndroidUtilities.hideKeyboard(editTextView)); + dialogView.addView(editTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 23, 12, 23, 21)); + editTextView.requestFocus(); + AndroidUtilities.showKeyboard(editTextView); + + AlertDialog dialog = builder.create(); + editTextView.setOnEditorActionListener((textView, i, keyEvent) -> { + if ((i == EditorInfo.IME_ACTION_DONE || (peerId > 0 && keyEvent.getKeyCode() == KeyEvent.KEYCODE_ENTER)) && dialog.isShowing()) { + onDoneListener.onClick(dialog, 0); + return true; + } + return false; + }); + + dialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_dialogBackground)); + dialog.show(); + dialog.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); + + } + + public static void createChangeNameAlert(int peerId, Context context, int currentAccount) { + String currentName; + String currentLastName = null; + if (peerId > 0) { + TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(peerId); + currentName = user.first_name; + currentLastName = user.last_name; + } else { + TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-peerId); + currentName = chat.title; + } + AlertDialog.Builder builder = new AlertDialog.Builder(context); + builder.setTitle(peerId > 0 ? LocaleController.getString("VoipEditName", R.string.VoipEditName) : LocaleController.getString("VoipEditTitle", R.string.VoipEditTitle)); + LinearLayout dialogView = new LinearLayout(context); + dialogView.setOrientation(LinearLayout.VERTICAL); + + EditText firstNameEditTextView = new EditText(context); + firstNameEditTextView.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); + firstNameEditTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); + firstNameEditTextView.setMaxLines(1); + firstNameEditTextView.setLines(1); + firstNameEditTextView.setSingleLine(true); + firstNameEditTextView.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT); + firstNameEditTextView.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT); + firstNameEditTextView.setImeOptions(peerId > 0 ? EditorInfo.IME_ACTION_NEXT : EditorInfo.IME_ACTION_DONE); + firstNameEditTextView.setHint(peerId > 0 ? LocaleController.getString("FirstName", R.string.FirstName) : LocaleController.getString("VoipEditTitleHint", R.string.VoipEditTitleHint)); + firstNameEditTextView.setBackground(Theme.createEditTextDrawable(context, true)); + firstNameEditTextView.setPadding(0, AndroidUtilities.dp(8), 0, AndroidUtilities.dp(8)); + firstNameEditTextView.requestFocus(); + + EditText lastNameEditTextView = null; + if (peerId > 0) { + lastNameEditTextView = new EditText(context); + lastNameEditTextView.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); + lastNameEditTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); + lastNameEditTextView.setMaxLines(1); + lastNameEditTextView.setLines(1); + lastNameEditTextView.setSingleLine(true); + lastNameEditTextView.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT); + lastNameEditTextView.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT); + lastNameEditTextView.setImeOptions(EditorInfo.IME_ACTION_DONE); + lastNameEditTextView.setHint(LocaleController.getString("LastName", R.string.LastName)); + lastNameEditTextView.setBackground(Theme.createEditTextDrawable(context, true)); + lastNameEditTextView.setPadding(0, AndroidUtilities.dp(8), 0, AndroidUtilities.dp(8)); + } + + AndroidUtilities.showKeyboard(firstNameEditTextView); + + dialogView.addView(firstNameEditTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 23, 12, 23, 21)); + if (lastNameEditTextView != null) { + dialogView.addView(lastNameEditTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 23, 12, 23, 21)); + } + + firstNameEditTextView.setText(currentName); + firstNameEditTextView.setSelection(firstNameEditTextView.getText().toString().length()); + + if (lastNameEditTextView != null) { + lastNameEditTextView.setText(currentLastName); + lastNameEditTextView.setSelection(lastNameEditTextView.getText().toString().length()); + } + + + builder.setView(dialogView); + EditText finalLastNameEditTextView = lastNameEditTextView; + DialogInterface.OnClickListener onDoneListener = (dialogInterface, i) -> { + if (firstNameEditTextView.getText() == null) { + return; + } + if (peerId > 0) { + TLRPC.User currentUser = MessagesController.getInstance(currentAccount).getUser(peerId); + + String newFirst = firstNameEditTextView.getText().toString(); + String newLast = finalLastNameEditTextView.getText().toString(); + String oldFirst = currentUser.first_name; + String oldLast = currentUser.last_name; + if (oldFirst == null) { + oldFirst = ""; + } + if (oldLast == null) { + oldLast = ""; + } + if (oldFirst.equals(newFirst) && oldLast.equals(newLast)) { + dialogInterface.dismiss(); + return; + } + TLRPC.TL_account_updateProfile req = new TLRPC.TL_account_updateProfile(); + req.flags = 3; + currentUser.first_name = req.first_name = newFirst; + currentUser.last_name = req.last_name = newLast; + TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(UserConfig.getInstance(currentAccount).getClientUserId()); + if (user != null) { + user.first_name = req.first_name; + user.last_name = req.last_name; + } + UserConfig.getInstance(currentAccount).saveConfig(true); + NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.mainUserInfoChanged); + NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.updateInterfaces, MessagesController.UPDATE_MASK_NAME); + ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> { + + }); + NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.showBulletin, Bulletin.TYPE_NAME_CHANGED, peerId); + } else { + TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-peerId); + String newFirst = firstNameEditTextView.getText().toString(); + if (chat.title != null && chat.title.equals(newFirst)) { + dialogInterface.dismiss(); + return; + } + chat.title = newFirst; + NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.updateInterfaces, MessagesController.UPDATE_MASK_CHAT_NAME); + MessagesController.getInstance(currentAccount).changeChatTitle(-peerId, newFirst); + NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.showBulletin, Bulletin.TYPE_NAME_CHANGED, peerId); + } + dialogInterface.dismiss(); + }; + builder.setPositiveButton(LocaleController.getString("Save", R.string.Save), onDoneListener); + builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); + builder.setOnPreDismissListener(dialogInterface -> { + AndroidUtilities.hideKeyboard(firstNameEditTextView); + AndroidUtilities.hideKeyboard(finalLastNameEditTextView); + }); + AlertDialog dialog = builder.create(); + + dialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_dialogBackground)); + dialog.show(); + dialog.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); + + TextView.OnEditorActionListener actionListener = (textView, i, keyEvent) -> { + if ((i == EditorInfo.IME_ACTION_DONE || keyEvent.getKeyCode() == KeyEvent.KEYCODE_ENTER) && dialog.isShowing()) { + onDoneListener.onClick(dialog, 0); + return true; + } + return false; + }; + if (lastNameEditTextView != null) { + lastNameEditTextView.setOnEditorActionListener(actionListener); + } else { + firstNameEditTextView.setOnEditorActionListener(actionListener); + } + + } + public interface BlockDialogCallback { void run(boolean report, boolean delete); } @@ -1640,16 +1951,28 @@ public class AlertsCreator { return builder; } - private static boolean checkScheduleDate(TextView button, boolean reminder, NumberPicker dayPicker, NumberPicker hourPicker, NumberPicker minutePicker) { + public static boolean checkScheduleDate(TextView button, TextView infoText, int type, NumberPicker dayPicker, NumberPicker hourPicker, NumberPicker minutePicker) { + return checkScheduleDate(button, infoText, 0, type, dayPicker, hourPicker, minutePicker); + } + + public static boolean checkScheduleDate(TextView button, TextView infoText, long maxDate, int type, NumberPicker dayPicker, NumberPicker hourPicker, NumberPicker minutePicker) { int day = dayPicker.getValue(); int hour = hourPicker.getValue(); int minute = minutePicker.getValue(); - Calendar calendar = Calendar.getInstance(); + long systemTime = System.currentTimeMillis(); calendar.setTimeInMillis(systemTime); int currentYear = calendar.get(Calendar.YEAR); int currentDay = calendar.get(Calendar.DAY_OF_YEAR); + if (maxDate > 0) { + maxDate *= 1000; + calendar.setTimeInMillis(systemTime + maxDate); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + maxDate = calendar.getTimeInMillis(); + } calendar.setTimeInMillis(System.currentTimeMillis() + (long) day * 24 * 3600 * 1000); calendar.set(Calendar.HOUR_OF_DAY, hour); @@ -1658,11 +1981,18 @@ public class AlertsCreator { if (currentTime <= systemTime + 60000L) { calendar.setTimeInMillis(systemTime + 60000L); + if (currentDay != calendar.get(Calendar.DAY_OF_YEAR)) { dayPicker.setValue(day = 1); } hourPicker.setValue(hour = calendar.get(Calendar.HOUR_OF_DAY)); minutePicker.setValue(minute = calendar.get(Calendar.MINUTE)); + } else if (maxDate > 0 && currentTime > maxDate) { + calendar.setTimeInMillis(maxDate); + + dayPicker.setValue(day = 7); + hourPicker.setValue(hour = calendar.get(Calendar.HOUR_OF_DAY)); + minutePicker.setValue(minute = calendar.get(Calendar.MINUTE)); } int selectedYear = calendar.get(Calendar.YEAR); @@ -1670,8 +2000,8 @@ public class AlertsCreator { calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, minute); + long time = calendar.getTimeInMillis(); if (button != null) { - long time = calendar.getTimeInMillis(); int num; if (day == 0) { num = 0; @@ -1680,11 +2010,33 @@ public class AlertsCreator { } else { num = 2; } - if (reminder) { + if (type == 1) { num += 3; + } else if (type == 2) { + num += 6; + } else if (type == 3) { + num += 9; } button.setText(LocaleController.getInstance().formatterScheduleSend[num].format(time)); } + if (infoText != null) { + int diff = (int) ((time - systemTime) / 1000); + String t; + if (diff > 24 * 60 * 60) { + t = LocaleController.formatPluralString("DaysSchedule", diff / (24 * 60 * 60)); + } else if (diff >= 60 * 60) { + t = LocaleController.formatPluralString("HoursSchedule", diff / (60 * 60)); + } else if (diff >= 60) { + t = LocaleController.formatPluralString("MinutesSchedule", diff / 60); + } else { + t = LocaleController.formatPluralString("SecondsSchedule", diff); + } + if (infoText.getTag() != null) { + infoText.setText(LocaleController.formatString("VoipGroupScheduleInfo", R.string.VoipGroupScheduleInfo, t)); + } else { + infoText.setText(LocaleController.formatString("VoipChannelScheduleInfo", R.string.VoipChannelScheduleInfo, t)); + } + } return currentTime - systemTime > 60000L; } @@ -1892,7 +2244,7 @@ public class AlertsCreator { } catch (Exception ignore) { } - checkScheduleDate(buttonTextView, selfUserId == dialogId, dayPicker, hourPicker, minutePicker); + checkScheduleDate(buttonTextView, null, selfUserId == dialogId ? 1 : 0, dayPicker, hourPicker, minutePicker); }; dayPicker.setOnValueChangedListener(onValueChangeListener); @@ -1926,7 +2278,7 @@ public class AlertsCreator { } final boolean[] canceled = {true}; - checkScheduleDate(buttonTextView, selfUserId == dialogId, dayPicker, hourPicker, minutePicker); + checkScheduleDate(buttonTextView, null, selfUserId == dialogId ? 1 : 0, dayPicker, hourPicker, minutePicker); buttonTextView.setPadding(AndroidUtilities.dp(34), 0, AndroidUtilities.dp(34), 0); buttonTextView.setGravity(Gravity.CENTER); @@ -1937,7 +2289,7 @@ public class AlertsCreator { container.addView(buttonTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.BOTTOM, 16, 15, 16, 16)); buttonTextView.setOnClickListener(v -> { canceled[0] = false; - boolean setSeconds = checkScheduleDate(null, selfUserId == dialogId, dayPicker, hourPicker, minutePicker); + boolean setSeconds = checkScheduleDate(null, null, selfUserId == dialogId ? 1 : 0, dayPicker, hourPicker, minutePicker); calendar.setTimeInMillis(System.currentTimeMillis() + (long) dayPicker.getValue() * 24 * 3600 * 1000); calendar.set(Calendar.HOUR_OF_DAY, hourPicker.getValue()); calendar.set(Calendar.MINUTE, minutePicker.getValue()); @@ -2078,7 +2430,7 @@ public class AlertsCreator { } catch (Exception ignore) { } - checkScheduleDate(null, false, dayPicker, hourPicker, minutePicker); + checkScheduleDate(null, null, 0, dayPicker, hourPicker, minutePicker); }; dayPicker.setOnValueChangedListener(onValueChangeListener); @@ -2110,9 +2462,8 @@ public class AlertsCreator { dayPicker.setValue(days); } } - final boolean[] canceled = {true}; - checkScheduleDate(null, false, dayPicker, hourPicker, minutePicker); + checkScheduleDate(null, null, 0, dayPicker, hourPicker, minutePicker); buttonTextView.setPadding(AndroidUtilities.dp(34), 0, AndroidUtilities.dp(34), 0); buttonTextView.setGravity(Gravity.CENTER); @@ -2123,8 +2474,7 @@ public class AlertsCreator { buttonTextView.setText(LocaleController.getString("SetTimeLimit", R.string.SetTimeLimit)); container.addView(buttonTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.BOTTOM, 16, 15, 16, 16)); buttonTextView.setOnClickListener(v -> { - canceled[0] = false; - boolean setSeconds = checkScheduleDate(null, false, dayPicker, hourPicker, minutePicker); + boolean setSeconds = checkScheduleDate(null, null, 0, dayPicker, hourPicker, minutePicker); calendar.setTimeInMillis(System.currentTimeMillis() + (long) dayPicker.getValue() * 24 * 3600 * 1000); calendar.set(Calendar.HOUR_OF_DAY, hourPicker.getValue()); calendar.set(Calendar.MINUTE, minutePicker.getValue()); @@ -3011,7 +3361,7 @@ public class AlertsCreator { BackupImageView imageView = new BackupImageView(activity); imageView.setRoundRadius(AndroidUtilities.dp(26)); - imageView.setImage(ImageLocation.getForUser(selfUser, false), "50_50", (Drawable) null, selfUser); + imageView.setImage(ImageLocation.getForUserOrChat(selfUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(selfUser, ImageLocation.TYPE_STRIPPED), "50_50", (Drawable) null, selfUser); frameLayout.addView(imageView, LayoutHelper.createFrame(52, 52, Gravity.CENTER, 0, 0, 0, 11)); builder.setTopView(frameLayout); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/AvatarsImageView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/AvatarsImageView.java index 56357b3fb..12e8addb4 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/AvatarsImageView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/AvatarsImageView.java @@ -234,9 +234,9 @@ public class AvatarsImageView extends FrameLayout { animatingStates[index].id = -currentChat.id; } if (currentUser != null) { - animatingStates[index].imageReceiver.setImage(ImageLocation.getForUser(currentUser, false), "50_50", animatingStates[index].avatarDrawable, null, currentUser, 0); + animatingStates[index].imageReceiver.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", animatingStates[index].avatarDrawable, currentUser, 0); } else { - animatingStates[index].imageReceiver.setImage(ImageLocation.getForChat(currentChat, false), "50_50", animatingStates[index].avatarDrawable, null, currentChat, 0); + animatingStates[index].imageReceiver.setImage(ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_STRIPPED), "50_50", animatingStates[index].avatarDrawable, currentChat, 0); } animatingStates[index].imageReceiver.setRoundRadius(AndroidUtilities.dp(currentStyle == 4 ? 16 : 12)); int size = AndroidUtilities.dp(currentStyle == 4 ? 32 : 24); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/Bulletin.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/Bulletin.java index a18de5f14..7750c3e3f 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/Bulletin.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/Bulletin.java @@ -61,6 +61,8 @@ public final class Bulletin { public static final int TYPE_STICKER = 0; public static final int TYPE_ERROR = 1; + public static final int TYPE_BIO_CHANGED = 2; + public static final int TYPE_NAME_CHANGED = 3; public static Bulletin make(@NonNull FrameLayout containerLayout, @NonNull Layout contentLayout, int duration) { return new Bulletin(containerLayout, contentLayout, duration); @@ -1031,6 +1033,7 @@ public final class Bulletin { textView.setTypeface(Typeface.SANS_SERIF); textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15); textView.setEllipsize(TextUtils.TruncateAt.END); + textView.setPadding(0, AndroidUtilities.dp(8), 0, AndroidUtilities.dp(8)); addView(textView, LayoutHelper.createFrameRelatively(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.CENTER_VERTICAL, 56, 0, 16, 0)); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java index 04948ecc3..d07641a57 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java @@ -116,6 +116,8 @@ public final class BulletinFactory { final Bulletin.LottieLayout layout = new Bulletin.LottieLayout(getContext()); layout.setAnimation(iconRawId, 36, 36); layout.textView.setText(text); + layout.textView.setSingleLine(false); + layout.textView.setMaxLines(2); return create(layout, Bulletin.DURATION_SHORT); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java index 6fdfd9ca3..f45b25c31 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java @@ -49,6 +49,7 @@ import android.text.TextPaint; import android.text.TextUtils; import android.text.TextWatcher; import android.text.style.ImageSpan; +import android.util.Log; import android.util.Property; import android.util.TypedValue; import android.view.ActionMode; @@ -3457,7 +3458,9 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe showKeyboardOnResume = true; } AndroidUtilities.runOnUIThread(hideKeyboardRunnable = () -> { - closeKeyboard(); + if (parentFragment == null || parentFragment.isLastFragment()) { + closeKeyboard(); + } hideKeyboardRunnable = null; }, 500); } @@ -4819,7 +4822,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe slideText.setTranslationX(0); recordCircle.showTooltipIfNeed(); - messageEditText.setVisibility(View.GONE); + messageEditText.setAlpha(0f); } }); runningAnimationAudio.setInterpolator(new DecelerateInterpolator()); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java index c079cedd7..7f94da8cb 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java @@ -391,6 +391,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N private Paint attachButtonPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private float bottomPannelTranslation; + private boolean forceDarkTheme; private class AttachButton extends FrameLayout { @@ -552,7 +553,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N currentUser = user; nameTextView.setText(ContactsController.formatName(user.first_name, user.last_name)); avatarDrawable.setInfo(user); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); requestLayout(); } } @@ -563,8 +564,9 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N float currentPanTranslationY; @SuppressLint("ClickableViewAccessibility") - public ChatAttachAlert(Context context, final BaseFragment parentFragment) { + public ChatAttachAlert(Context context, final BaseFragment parentFragment, boolean forceDarkTheme) { super(context, false); + this.forceDarkTheme = forceDarkTheme; drawNavigationBar = true; inBubbleMode = parentFragment instanceof ChatActivity && parentFragment.isInBubbleMode(); openInterpolator = new OvershootInterpolator(0.7f); @@ -896,8 +898,9 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N shadowDrawable.setAlpha(viewAlpha); shadowDrawable.setBounds(0, top, getMeasuredWidth(), height); shadowDrawable.draw(canvas); + int backgroundColor = Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_listViewBackground : Theme.key_dialogBackground); if (actionBarType == 2) { - Theme.dialogs_onlineCirclePaint.setColor(Theme.getColor(Theme.key_dialogBackground)); + Theme.dialogs_onlineCirclePaint.setColor(backgroundColor); Theme.dialogs_onlineCirclePaint.setAlpha(viewAlpha); rect.set(backgroundPaddingLeft, backgroundPaddingTop + top, getMeasuredWidth() - backgroundPaddingLeft, backgroundPaddingTop + top + AndroidUtilities.dp(24)); canvas.save(); @@ -909,7 +912,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N boolean result = super.drawChild(canvas, child, drawingTime); if (rad != 1.0f && actionBarType != 2) { - Theme.dialogs_onlineCirclePaint.setColor(Theme.getColor(Theme.key_dialogBackground)); + Theme.dialogs_onlineCirclePaint.setColor(backgroundColor); Theme.dialogs_onlineCirclePaint.setAlpha(viewAlpha); rect.set(backgroundPaddingLeft, backgroundPaddingTop + top, getMeasuredWidth() - backgroundPaddingLeft, backgroundPaddingTop + top + AndroidUtilities.dp(24)); canvas.save(); @@ -946,7 +949,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N if (inBubbleMode) { return; } - int color1 = Theme.getColor(Theme.key_dialogBackground); + int color1 = Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_listViewBackground : Theme.key_dialogBackground); int finalColor = Color.argb((int) (255 * actionBar.getAlpha()), (int) (Color.red(color1) * 0.8f), (int) (Color.green(color1) * 0.8f), (int) (Color.blue(color1) * 0.8f)); Theme.dialogs_onlineCirclePaint.setColor(finalColor); canvas.drawRect(backgroundPaddingLeft, currentPanTranslationY, getMeasuredWidth() - backgroundPaddingLeft, AndroidUtilities.statusBarHeight + currentPanTranslationY, Theme.dialogs_onlineCirclePaint); @@ -1162,7 +1165,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N selectedTextView.setVisibility(View.INVISIBLE); selectedTextView.setAlpha(0.0f); - layouts[0] = photoLayout = new ChatAttachAlertPhotoLayout(this, context); + layouts[0] = photoLayout = new ChatAttachAlertPhotoLayout(this, context, forceDarkTheme); currentAttachLayout = photoLayout; selectedId = 1; containerView.addView(photoLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); @@ -1309,7 +1312,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N float alphaOffset = (frameLayout2.getMeasuredHeight() - AndroidUtilities.dp(84)) * (1f - getAlpha()); shadow.setTranslationY(-(frameLayout2.getMeasuredHeight() - AndroidUtilities.dp(84)) + captionEditTextTopOffset + currentPanTranslationY + bottomPannelTranslation + alphaOffset); - int newColor = Theme.getColor(Theme.key_dialogBackground); + int newColor = Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_listViewBackground : Theme.key_dialogBackground); if (color != newColor) { color = newColor; p.setColor(color); @@ -1688,6 +1691,11 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N selectedCountView.setScaleX(0.2f); selectedCountView.setScaleY(0.2f); containerView.addView(selectedCountView, LayoutHelper.createFrame(42, 24, Gravity.RIGHT | Gravity.BOTTOM, 0, 0, -8, 9)); + + if (forceDarkTheme) { + checkColors(); + navBarColorKey = null; + } } @Override @@ -2130,18 +2138,18 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N for (int a = 0; a < count; a++) { applyAttachButtonColors(buttonsRecyclerView.getChildAt(a)); } - selectedTextView.setTextColor(Theme.getColor(Theme.key_dialogTextBlack)); + selectedTextView.setTextColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItems) : Theme.getColor(Theme.key_dialogTextBlack)); doneItem.getTextView().setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlueHeader)); - selectedMenuItem.setIconColor(Theme.getColor(Theme.key_dialogTextBlack)); - Theme.setDrawableColor(selectedMenuItem.getBackground(), Theme.getColor(Theme.key_dialogButtonSelector)); + selectedMenuItem.setIconColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItems) : Theme.getColor(Theme.key_dialogTextBlack)); + Theme.setDrawableColor(selectedMenuItem.getBackground(), forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItemsSelector) : Theme.getColor(Theme.key_dialogButtonSelector)); selectedMenuItem.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), false); selectedMenuItem.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), true); selectedMenuItem.redrawPopup(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground)); - searchItem.setIconColor(Theme.getColor(Theme.key_dialogTextBlack)); - Theme.setDrawableColor(searchItem.getBackground(), Theme.getColor(Theme.key_dialogButtonSelector)); + searchItem.setIconColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItems) : Theme.getColor(Theme.key_dialogTextBlack)); + Theme.setDrawableColor(searchItem.getBackground(), forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItemsSelector) : Theme.getColor(Theme.key_dialogButtonSelector)); commentTextView.updateColors(); @@ -2149,7 +2157,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N for (int a = 0; a < itemCells.length; a++) { if (itemCells[a] != null) { itemCells[a].setColors(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon)); - itemCells[a].setSelectorColor(Theme.getColor(Theme.key_dialogButtonSelector)); + itemCells[a].setSelectorColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItemsSelector) : Theme.getColor(Theme.key_dialogButtonSelector)); } } sendPopupLayout.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground)); @@ -2165,18 +2173,18 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N actionBarShadow.setBackgroundColor(Theme.getColor(Theme.key_dialogShadowLine)); buttonsRecyclerView.setGlowColor(Theme.getColor(Theme.key_dialogScrollGlow)); - buttonsRecyclerView.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground)); + buttonsRecyclerView.setBackgroundColor(Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_listViewBackground : Theme.key_dialogBackground)); - frameLayout2.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground)); + frameLayout2.setBackgroundColor(Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_listViewBackground : Theme.key_dialogBackground)); selectedCountView.invalidate(); - actionBar.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground)); - actionBar.setItemsColor(Theme.getColor(Theme.key_dialogTextBlack), false); - actionBar.setItemsBackgroundColor(Theme.getColor(Theme.key_dialogButtonSelector), false); - actionBar.setTitleColor(Theme.getColor(Theme.key_dialogTextBlack)); + actionBar.setBackgroundColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBar) : Theme.getColor(Theme.key_dialogBackground)); + actionBar.setItemsColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItems) : Theme.getColor(Theme.key_dialogTextBlack), false); + actionBar.setItemsBackgroundColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItemsSelector) : Theme.getColor(Theme.key_dialogButtonSelector), false); + actionBar.setTitleColor(forceDarkTheme ? Theme.getColor(Theme.key_voipgroup_actionBarItems) : Theme.getColor(Theme.key_dialogTextBlack)); - Theme.setDrawableColor(shadowDrawable, Theme.getColor(Theme.key_dialogBackground)); + Theme.setDrawableColor(shadowDrawable, Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_listViewBackground : Theme.key_dialogBackground)); containerView.invalidate(); @@ -2489,7 +2497,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N if (baseFragment == null) { return; } - if (baseFragment instanceof ChatActivity) { + if (baseFragment instanceof ChatActivity && avatarPicker != 2) { TLRPC.Chat chat = ((ChatActivity) baseFragment).getCurrentChat(); TLRPC.User user = ((ChatActivity) baseFragment).getCurrentUser(); if (chat != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertContactsLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertContactsLayout.java index 5fab1da19..be2606fc8 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertContactsLayout.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertContactsLayout.java @@ -208,7 +208,7 @@ public class ChatAttachAlertContactsLayout extends ChatAttachAlert.AttachAlertLa lastAvatar = photo; if (currentUser != null) { - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } else { avatarImageView.setImageDrawable(avatarDrawable); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPhotoLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPhotoLayout.java index f2f33559a..4ee764590 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPhotoLayout.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPhotoLayout.java @@ -190,6 +190,8 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou private final static int compress = 1; private final static int open_in = 2; + boolean forceDarkTheme; + private class BasePhotoProvider extends PhotoViewer.EmptyPhotoViewerProvider { @Override public boolean isPhotoChecked(int index) { @@ -433,8 +435,9 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou return arrayList; } - public ChatAttachAlertPhotoLayout(ChatAttachAlert alert, Context context) { + public ChatAttachAlertPhotoLayout(ChatAttachAlert alert, Context context, boolean forceDarkTheme) { super(alert, context); + this.forceDarkTheme = forceDarkTheme; NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.albumsDidLoad); NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.cameraInitied); FrameLayout container = alert.getContainer(); @@ -596,16 +599,15 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou PhotoViewer.getInstance().setMaxSelectedPhotos(parentAlert.maxSelectedPhotos, parentAlert.allowOrder); ChatActivity chatActivity; int type; - if (parentAlert.baseFragment instanceof ChatActivity) { + if (parentAlert.avatarPicker != 0) { + chatActivity = null; + type = PhotoViewer.SELECT_TYPE_AVATAR; + } else if (parentAlert.baseFragment instanceof ChatActivity) { chatActivity = (ChatActivity) parentAlert.baseFragment; type = 0; } else { chatActivity = null; - if (parentAlert.avatarPicker != 0) { - type = PhotoViewer.SELECT_TYPE_AVATAR; - } else { - type = 4; - } + type = 4; } AndroidUtilities.hideKeyboard(parentAlert.baseFragment.getFragmentView().findFocus()); AndroidUtilities.hideKeyboard(parentAlert.getContainer().findFocus()); @@ -1247,16 +1249,15 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou ChatActivity chatActivity; int type; - if (parentAlert.baseFragment instanceof ChatActivity) { + if (parentAlert.avatarPicker != 0) { + type = PhotoViewer.SELECT_TYPE_AVATAR; + chatActivity = null; + } else if (parentAlert.baseFragment instanceof ChatActivity) { chatActivity = (ChatActivity) parentAlert.baseFragment; type = 2; } else { chatActivity = null; - if (parentAlert.avatarPicker != 0) { - type = PhotoViewer.SELECT_TYPE_AVATAR; - } else { - type = 5; - } + type = 5; } ArrayList arrayList; int index; @@ -1490,7 +1491,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou } public void checkCamera(boolean request) { - if (parentAlert.baseFragment == null) { + if (parentAlert.baseFragment == null || parentAlert.baseFragment.getParentActivity() == null) { return; } boolean old = deviceHasGoodCamera; @@ -2363,6 +2364,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou if (cameraIcon != null) { cameraIcon.invalidate(); } + String textColor = forceDarkTheme ? Theme.key_voipgroup_actionBarItems : Theme.key_dialogTextBlack; Theme.setDrawableColor(cameraDrawable, Theme.getColor(Theme.key_dialogCameraIcon)); progressView.setTextColor(Theme.getColor(Theme.key_emptyListPlaceholder)); gridView.setGlowColor(Theme.getColor(Theme.key_dialogScrollGlow)); @@ -2371,11 +2373,11 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou ((PhotoAttachCameraCell) holder.itemView).getImageView().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogCameraIcon), PorterDuff.Mode.MULTIPLY)); } - dropDown.setTextColor(Theme.getColor(Theme.key_dialogTextBlack)); - dropDownContainer.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), false); - dropDownContainer.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), true); - dropDownContainer.redrawPopup(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground)); - Theme.setDrawableColor(dropDownDrawable, Theme.getColor(Theme.key_dialogTextBlack)); + dropDown.setTextColor(Theme.getColor(textColor)); + dropDownContainer.setPopupItemsColor(Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_actionBarItems : Theme.key_actionBarDefaultSubmenuItem), false); + dropDownContainer.setPopupItemsColor(Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_actionBarItems :Theme.key_actionBarDefaultSubmenuItem), true); + dropDownContainer.redrawPopup(Theme.getColor(forceDarkTheme ? Theme.key_voipgroup_actionBarUnscrolled : Theme.key_actionBarDefaultSubmenuBackground)); + Theme.setDrawableColor(dropDownDrawable, Theme.getColor(textColor)); } @Override @@ -2389,7 +2391,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou cameraIcon.setAlpha(mediaEnabled ? 1.0f : 0.2f); cameraIcon.setEnabled(mediaEnabled); } - if (parentAlert.baseFragment instanceof ChatActivity) { + if (parentAlert.baseFragment instanceof ChatActivity && parentAlert.avatarPicker == 0) { galleryAlbumEntry = MediaController.allMediaAlbumEntry; if (mediaEnabled) { progressView.setText(LocaleController.getString("NoPhotos", R.string.NoPhotos)); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java index c803d239e..6a1ec32a6 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java @@ -589,7 +589,7 @@ public class ChatAvatarContainer extends FrameLayout implements NotificationCent public void setChatAvatar(TLRPC.Chat chat) { avatarDrawable.setInfo(chat); if (avatarImageView != null) { - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } @@ -615,7 +615,7 @@ public class ChatAvatarContainer extends FrameLayout implements NotificationCent } else { avatarDrawable.setSmallSize(false); if (avatarImageView != null) { - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } } @@ -643,13 +643,13 @@ public class ChatAvatarContainer extends FrameLayout implements NotificationCent } else { avatarDrawable.setSmallSize(false); if (avatarImageView != null) { - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } } else if (chat != null) { avatarDrawable.setInfo(chat); if (avatarImageView != null) { - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatGreetingsView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatGreetingsView.java index 682995d14..d4acc5cfe 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatGreetingsView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatGreetingsView.java @@ -9,25 +9,20 @@ import android.widget.TextView; import org.telegram.messenger.AndroidUtilities; import org.telegram.messenger.DocumentObject; -import org.telegram.messenger.Emoji; import org.telegram.messenger.FileLoader; import org.telegram.messenger.ImageLocation; import org.telegram.messenger.LocaleController; +import org.telegram.messenger.MediaDataController; import org.telegram.messenger.MessageObject; -import org.telegram.messenger.MessagesController; import org.telegram.messenger.NotificationCenter; import org.telegram.messenger.R; import org.telegram.messenger.SvgHelper; -import org.telegram.messenger.UserConfig; -import org.telegram.tgnet.ConnectionsManager; import org.telegram.tgnet.TLRPC; import org.telegram.ui.ActionBar.Theme; -import java.util.ArrayList; import java.util.Locale; -import java.util.Random; -public class ChatGreetingsView extends LinearLayout implements NotificationCenter.NotificationCenterDelegate { +public class ChatGreetingsView extends LinearLayout { private TLRPC.Document preloadedGreetingsSticker; private TextView titleView; @@ -39,7 +34,7 @@ public class ChatGreetingsView extends LinearLayout implements NotificationCente public BackupImageView stickerToSendView; - public ChatGreetingsView(Context context, TLRPC.User user, int distance, int currentAccount, TLRPC.Document preloadedGreetingsSticker) { + public ChatGreetingsView(Context context, TLRPC.User user, int distance, int currentAccount, TLRPC.Document sticker) { super(context); setOrientation(VERTICAL); this.currentAccount = currentAccount; @@ -70,16 +65,17 @@ public class ChatGreetingsView extends LinearLayout implements NotificationCente descriptionView.setText(LocaleController.getString("NearbyPeopleGreetingsDescription", R.string.NearbyPeopleGreetingsDescription)); } - this.preloadedGreetingsSticker = preloadedGreetingsSticker; - + preloadedGreetingsSticker = sticker; if (preloadedGreetingsSticker == null) { - MessagesController.getInstance(currentAccount).preloadGreetingsSticker(); - } else { - setSticker(preloadedGreetingsSticker); + preloadedGreetingsSticker = MediaDataController.getInstance(currentAccount).getGreetingsSticker(); } + setSticker(preloadedGreetingsSticker); } private void setSticker(TLRPC.Document sticker) { + if (sticker == null) { + return; + } SvgHelper.SvgDrawable svgThumb = DocumentObject.getSvgThumb(sticker, Theme.key_chat_serviceBackground, 1.0f); if (svgThumb != null) { stickerToSendView.setImage(ImageLocation.getForDocument(sticker), createFilter(sticker), svgThumb, 0, sticker); @@ -177,26 +173,17 @@ public class ChatGreetingsView extends LinearLayout implements NotificationCente protected void onAttachedToWindow() { super.onAttachedToWindow(); fetchSticker(); - NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.greetingsStickerLoaded); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); - NotificationCenter.getInstance(currentAccount).removeObserver(this, NotificationCenter.greetingsStickerLoaded); } private void fetchSticker() { if (preloadedGreetingsSticker == null) { - preloadedGreetingsSticker = MessagesController.getInstance(currentAccount).getPreloadedSticker(); - if (preloadedGreetingsSticker != null) { - setSticker(preloadedGreetingsSticker); - } + preloadedGreetingsSticker = MediaDataController.getInstance(currentAccount).getGreetingsSticker(); + setSticker(preloadedGreetingsSticker); } } - - @Override - public void didReceivedNotification(int id, int account, Object... args) { - fetchSticker(); - } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ContextProgressView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ContextProgressView.java index 361dad03d..15952d2b1 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ContextProgressView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ContextProgressView.java @@ -27,6 +27,8 @@ public class ContextProgressView extends View { private int currentColorType; private String innerKey; private String outerKey; + private int innerColor; + private int outerColor; public ContextProgressView(Context context, int colorType) { super(context); @@ -51,9 +53,25 @@ public class ContextProgressView extends View { updateColors(); } + public void setColors(int innerColor, int outerColor) { + innerKey = null; + outerKey = null; + this.innerColor = innerColor; + this.outerColor = outerColor; + updateColors(); + } + public void updateColors() { - innerPaint.setColor(Theme.getColor(innerKey)); - outerPaint.setColor(Theme.getColor(outerKey)); + if (innerKey != null) { + innerPaint.setColor(Theme.getColor(innerKey)); + } else { + innerPaint.setColor(innerColor); + } + if (outerKey != null) { + outerPaint.setColor(Theme.getColor(outerKey)); + } else { + outerPaint.setColor(outerColor); + } invalidate(); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java index 38c3110a9..c2c649252 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java @@ -1134,8 +1134,12 @@ public class FilterTabsView extends FrameLayout { } } if (indicatorWidth != 0) { + canvas.save(); + canvas.translate(listView.getTranslationX(), 0); + canvas.scale(listView.getScaleX(), 1f, listView.getPivotX() + listView.getX(), listView.getPivotY()); selectorDrawable.setBounds((int) indicatorX, height - AndroidUtilities.dpr(4), (int) (indicatorX + indicatorWidth), height); selectorDrawable.draw(canvas); + canvas.restore(); } } long newTime = SystemClock.elapsedRealtime(); @@ -1525,4 +1529,8 @@ public class FilterTabsView extends FrameLayout { viewHolder.itemView.setBackground(null); } } + + public RecyclerListView getListView() { + return listView; + } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextView.java index 8dccba721..cb8f5d383 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextView.java @@ -17,8 +17,13 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; +import android.graphics.LinearGradient; +import android.graphics.Matrix; +import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; +import android.graphics.RectF; +import android.graphics.Shader; import android.graphics.Typeface; import android.os.Build; import android.os.Bundle; @@ -26,8 +31,11 @@ import android.os.Bundle; import androidx.annotation.Keep; import android.os.SystemClock; +import android.text.Layout; import android.text.SpannableStringBuilder; import android.text.Spanned; +import android.text.StaticLayout; +import android.text.TextPaint; import android.text.TextUtils; import android.util.TypedValue; import android.view.Gravity; @@ -104,6 +112,42 @@ public class FragmentContextView extends FrameLayout implements NotificationCent private boolean supportsCalls = true; private AvatarsImageView avatars; + private Paint gradientPaint; + private LinearGradient linearGradient; + private Matrix matrix; + private int gradientWidth; + private TextPaint gradientTextPaint; + private StaticLayout timeLayout; + private RectF rect = new RectF(); + private boolean scheduleRunnableScheduled; + private Runnable updateScheduleTimeRunnable = new Runnable() { + @Override + public void run() { + if (gradientTextPaint == null || !(fragment instanceof ChatActivity)) { + scheduleRunnableScheduled = false; + return; + } + ChatObject.Call call = ((ChatActivity) fragment).getGroupCall(); + if (call == null || !call.isScheduled()) { + timeLayout = null; + scheduleRunnableScheduled = false; + return; + } + int currentTime = fragment.getConnectionsManager().getCurrentTime(); + int diff = call.call.schedule_date - currentTime; + String str; + if (diff >= 24 * 60 * 60) { + str = LocaleController.formatPluralString("Days", Math.round(diff / (24 * 60 * 60.0f))); + } else { + str = AndroidUtilities.formatFullDuration(call.call.schedule_date - currentTime); + } + int width = (int) Math.ceil(gradientTextPaint.measureText(str)); + timeLayout = new StaticLayout(str, gradientTextPaint, width, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); + AndroidUtilities.runOnUIThread(updateScheduleTimeRunnable, 1000); + frameLayout.invalidate(); + } + }; + private final int account = UserConfig.selectedAccount; private boolean isLocation; @@ -173,6 +217,44 @@ public class FragmentContextView extends FrameLayout implements NotificationCent avatars.invalidate(); } } + + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + if (currentStyle == 4 && timeLayout != null) { + int width = (int) Math.ceil(timeLayout.getLineWidth(0)) + AndroidUtilities.dp(24); + if (width != gradientWidth) { + linearGradient = new LinearGradient(0, 0, width * 1.7f, 0, new int[]{0xff648CF4, 0xff8C69CF, 0xffD45979, 0xffD45979}, new float[]{0.0f, 0.294f, 0.588f, 1.0f}, Shader.TileMode.CLAMP); + gradientPaint.setShader(linearGradient); + gradientWidth = width; + } + ChatObject.Call call = ((ChatActivity) fragment).getGroupCall(); + float moveProgress = 0.0f; + if (fragment != null && call != null && call.isScheduled()) { + long diff = ((long) call.call.schedule_date) * 1000 - fragment.getConnectionsManager().getCurrentTimeMillis(); + if (diff < 0) { + moveProgress = 1.0f; + } else if (diff < 5000) { + moveProgress = 1.0f - diff / 5000.0f; + } + if (diff < 6000) { + invalidate(); + } + } + matrix.reset(); + matrix.postTranslate(-gradientWidth * 0.7f * moveProgress, 0); + linearGradient.setLocalMatrix(matrix); + int x = getMeasuredWidth() - width - AndroidUtilities.dp(10); + int y = AndroidUtilities.dp(12); + rect.set(0, 0, width, AndroidUtilities.dp(24)); + canvas.save(); + canvas.translate(x, y); + canvas.drawRoundRect(rect, AndroidUtilities.dp(12), AndroidUtilities.dp(12), gradientPaint); + canvas.translate(AndroidUtilities.dp(12), AndroidUtilities.dp(4)); + timeLayout.draw(canvas); + canvas.restore(); + } + } }; addView(frameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 36, Gravity.TOP | Gravity.LEFT, 0, 0, 0, 0)); @@ -528,7 +610,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent } } else if (currentStyle == 3) { if (VoIPService.getSharedInstance() != null && getContext() instanceof LaunchActivity) { - GroupCallActivity.create((LaunchActivity) getContext(), AccountInstance.getInstance(VoIPService.getSharedInstance().getAccount())); + GroupCallActivity.create((LaunchActivity) getContext(), AccountInstance.getInstance(VoIPService.getSharedInstance().getAccount()), null, null, false, null); } } else if (currentStyle == 4) { if (fragment.getParentActivity() == null) { @@ -614,7 +696,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent show = true; } else if (fragment instanceof ChatActivity && fragment.getSendMessagesHelper().getImportingHistory(((ChatActivity) fragment).getDialogId()) != null && !isPlayingVoice()) { show = true; - } else if (fragment instanceof ChatActivity && ((ChatActivity) fragment).getGroupCall() != null && ((ChatActivity) fragment).getGroupCall().call.participants_count > 0 && !GroupCallPip.isShowing() && !isPlayingVoice()) { + } else if (fragment instanceof ChatActivity && ((ChatActivity) fragment).getGroupCall() != null && ((ChatActivity) fragment).getGroupCall().shouldShowPanel() && !GroupCallPip.isShowing() && !isPlayingVoice()) { show = true; } else { MessageObject messageObject = MediaController.getInstance().getPlayingMessageObject(); @@ -656,6 +738,10 @@ public class FragmentContextView extends FrameLayout implements NotificationCent } } currentStyle = style; + frameLayout.setWillNotDraw(currentStyle != 4); + if (style != 4) { + timeLayout = null; + } if (avatars != null) { avatars.setStyle(currentStyle); @@ -738,9 +824,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent frameLayout.setBackgroundColor(Theme.getColor(Theme.key_inappPlayerBackground)); frameLayout.setTag(Theme.key_inappPlayerBackground); muteButton.setVisibility(GONE); - subtitleTextView.setVisibility(VISIBLE); - joinButton.setVisibility(VISIBLE); for (int i = 0; i < 2; i++) { TextView textView = i == 0 ? titleTextView.getTextView() : titleTextView.getNextTextView(); @@ -754,7 +838,6 @@ public class FragmentContextView extends FrameLayout implements NotificationCent } titleTextView.setTag(Theme.key_inappPlayerPerformer); titleTextView.setPadding(0, 0, 0, 0); - titleTextView.setText(LocaleController.getString("VoipGroupVoiceChat", R.string.VoipGroupVoiceChat), false); importingImageView.setVisibility(GONE); importingImageView.stopAnimation(); @@ -820,6 +903,10 @@ public class FragmentContextView extends FrameLayout implements NotificationCent animatorSet.cancel(); animatorSet = null; } + if (scheduleRunnableScheduled) { + AndroidUtilities.cancelRunOnUIThread(updateScheduleTimeRunnable); + scheduleRunnableScheduled = false; + } visible = false; NotificationCenter.getInstance(account).onAnimationFinish(animationIndex); topPadding = 0; @@ -885,7 +972,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent checkCall(true); } else if (fragment instanceof ChatActivity && fragment.getSendMessagesHelper().getImportingHistory(((ChatActivity) fragment).getDialogId()) != null && !isPlayingVoice()) { checkImport(true); - } else if (fragment instanceof ChatActivity && ((ChatActivity) fragment).getGroupCall() != null && ((ChatActivity) fragment).getGroupCall().call.participants_count > 0 && !GroupCallPip.isShowing() && !isPlayingVoice()) { + } else if (fragment instanceof ChatActivity && ((ChatActivity) fragment).getGroupCall() != null && ((ChatActivity) fragment).getGroupCall().shouldShowPanel() && !GroupCallPip.isShowing() && !isPlayingVoice()) { checkCall(true); } else { checkPlayer(true); @@ -905,6 +992,11 @@ public class FragmentContextView extends FrameLayout implements NotificationCent muteDrawable.setCurrentFrame(muteDrawable.getCustomEndFrame() - 1, false, true); muteButton.invalidate(); } + } else if (currentStyle == 4) { + if (!scheduleRunnableScheduled) { + scheduleRunnableScheduled = true; + updateScheduleTimeRunnable.run(); + } } if (visible && topPadding == 0) { @@ -963,7 +1055,9 @@ public class FragmentContextView extends FrameLayout implements NotificationCent if (visible && currentStyle == 4) { ChatObject.Call call = ((ChatActivity) fragment).getGroupCall(); if (call != null) { - if (call.call.participants_count == 0) { + if (call.isScheduled()) { + subtitleTextView.setText(LocaleController.formatStartsTime(call.call.schedule_date, 4), false); + } else if (call.call.participants_count == 0) { subtitleTextView.setText(LocaleController.getString("MembersTalkingNobody", R.string.MembersTalkingNobody), false); } else { subtitleTextView.setText(LocaleController.formatPluralString("Participants", call.call.participants_count), false); @@ -1226,7 +1320,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent boolean callAvailable = supportsCalls && VoIPService.getSharedInstance() != null && !VoIPService.getSharedInstance().isHangingUp() && VoIPService.getSharedInstance().getCallState() != VoIPService.STATE_WAITING_INCOMING && !GroupCallPip.isShowing(); if (!isPlayingVoice() && !callAvailable && fragment instanceof ChatActivity && !GroupCallPip.isShowing()) { ChatObject.Call call = ((ChatActivity) fragment).getGroupCall(); - callAvailable = call != null && call.call.participants_count > 0; + callAvailable = call != null && call.shouldShowPanel(); } if (callAvailable) { checkCall(false); @@ -1558,7 +1652,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent groupActive = false; if (!isPlayingVoice() && !GroupCallActivity.groupCallUiVisible && supportsCalls && !callAvailable && fragment instanceof ChatActivity) { ChatObject.Call call = ((ChatActivity) fragment).getGroupCall(); - if (call != null && call.call.participants_count > 0) { + if (call != null && call.shouldShowPanel()) { callAvailable = true; groupActive = true; } @@ -1614,7 +1708,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent int newStyle; if (groupActive) { newStyle = 4; - } else if (voIPService != null && voIPService.groupCall != null) { + } else if (voIPService.groupCall != null) { newStyle = 3; } else { newStyle = 1; @@ -1653,11 +1747,37 @@ public class FragmentContextView extends FrameLayout implements NotificationCent updateStyle(4); ChatObject.Call call = ((ChatActivity) fragment).getGroupCall(); + if (call.isScheduled()) { + if (gradientPaint == null) { + gradientTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); + gradientTextPaint.setColor(0xffffffff); + gradientTextPaint.setTextSize(AndroidUtilities.dp(14)); + gradientTextPaint.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); - if (call.call.participants_count == 0) { - subtitleTextView.setText(LocaleController.getString("MembersTalkingNobody", R.string.MembersTalkingNobody), false); + gradientPaint = new Paint(Paint.ANTI_ALIAS_FLAG); + gradientPaint.setColor(0xffffffff); + + matrix = new Matrix(); + } + joinButton.setVisibility(GONE); + if (!TextUtils.isEmpty(call.call.title)) { + titleTextView.setText(call.call.title, false); + } else { + titleTextView.setText(LocaleController.getString("VoipGroupScheduledVoiceChat", R.string.VoipGroupScheduledVoiceChat), false); + } + subtitleTextView.setText(LocaleController.formatStartsTime(call.call.schedule_date, 2), false); + if (!scheduleRunnableScheduled) { + scheduleRunnableScheduled = true; + updateScheduleTimeRunnable.run(); + } } else { - subtitleTextView.setText(LocaleController.formatPluralString("Participants", call.call.participants_count), false); + joinButton.setVisibility(VISIBLE); + titleTextView.setText(LocaleController.getString("VoipGroupVoiceChat", R.string.VoipGroupVoiceChat), false); + if (call.call.participants_count == 0) { + subtitleTextView.setText(LocaleController.getString("MembersTalkingNobody", R.string.MembersTalkingNobody), false); + } else { + subtitleTextView.setText(LocaleController.formatPluralString("Participants", call.call.participants_count), false); + } } updateAvatars(avatars.wasDraw && updateAnimated); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextViewWavesDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextViewWavesDrawable.java index 1434d1ff6..aaa17915d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextViewWavesDrawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentContextViewWavesDrawable.java @@ -10,6 +10,8 @@ import android.graphics.Shader; import android.os.SystemClock; import android.view.View; +import com.google.android.exoplayer2.util.Log; + import org.telegram.messenger.AndroidUtilities; import org.telegram.messenger.ChatObject; import org.telegram.messenger.Utilities; @@ -78,7 +80,11 @@ public class FragmentContextViewWavesDrawable { if (dt > 20) { dt = 17; } - + if (dt < 3) { + update = false; + } + } + if (update) { if (animateToAmplitude != amplitude) { amplitude += animateAmplitudeDiff * dt; if (animateAmplitudeDiff > 0) { @@ -145,7 +151,7 @@ public class FragmentContextViewWavesDrawable { lineBlobDrawable2.minRadius = AndroidUtilities.dp(0); lineBlobDrawable2.maxRadius = AndroidUtilities.dp(3) + AndroidUtilities.dp(9) * amplitude; - if (i == 1) { + if (i == 1 && update) { lineBlobDrawable.update(amplitude, 0.3f); lineBlobDrawable1.update(amplitude, 0.7f); lineBlobDrawable2.update(amplitude, 0.7f); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/GroupCreateSpan.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/GroupCreateSpan.java index 2c9d4bc59..8a2fb3ef8 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/GroupCreateSpan.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/GroupCreateSpan.java @@ -143,7 +143,7 @@ public class GroupCreateSpan extends View { } else { avatarDrawable.setInfo(user); firstName = UserObject.getFirstName(user); - imageLocation = ImageLocation.getForUser(user, false); + imageLocation = ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL); imageParent = user; } } else if (object instanceof TLRPC.Chat) { @@ -151,7 +151,7 @@ public class GroupCreateSpan extends View { avatarDrawable.setInfo(chat); uid = -chat.id; firstName = chat.title; - imageLocation = ImageLocation.getForChat(chat, false); + imageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL); imageParent = chat; } else { avatarDrawable.setInfo(0, contact.first_name, contact.last_name); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/HintView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/HintView.java index 41bcba6e6..0ce4f090d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/HintView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/HintView.java @@ -331,12 +331,14 @@ public class HintView extends FrameLayout { top += AndroidUtilities.dp(4); } else if (currentType == 6) { top += view.getMeasuredHeight() + getMeasuredHeight() + AndroidUtilities.dp(10); - } else if (currentType == 7 || currentType == 8) { + } else if (currentType == 7 || currentType == 8 && isTopArrow) { top += view.getMeasuredHeight() + getMeasuredHeight() + AndroidUtilities.dp(8); + } else if (currentType == 8) { + top -= AndroidUtilities.dp(10); } int centerX; - if (currentType == 8) { + if (currentType == 8 && isTopArrow) { if (view instanceof SimpleTextView) { SimpleTextView textView = (SimpleTextView) view; Drawable drawable = textView.getRightDrawable(); @@ -374,7 +376,9 @@ public class HintView extends FrameLayout { leftMargin = ((MarginLayoutParams) getLayoutParams()).leftMargin; rightMargin = ((MarginLayoutParams) getLayoutParams()).rightMargin; } - if (centerX > parentView.getMeasuredWidth() / 2) { + if (currentType == 8 && !isTopArrow) { + offset = (parentWidth - leftMargin - rightMargin - getMeasuredWidth()) / 2; + } else if (centerX > parentView.getMeasuredWidth() / 2) { if (currentType == TYPE_SEARCH_AS_LIST) { offset = (int) (parentWidth - getMeasuredWidth() * 1.5f); } else { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ImageUpdater.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ImageUpdater.java index 31eb257ca..e400484c7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ImageUpdater.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ImageUpdater.java @@ -88,6 +88,7 @@ public class ImageUpdater implements NotificationCenter.NotificationCenterDelega private double videoTimestamp; private boolean canSelectVideo; + private boolean forceDarkTheme; private final static int attach_photo = 0; @@ -208,6 +209,11 @@ public class ImageUpdater implements NotificationCenter.NotificationCenterDelega useAttachMenu = searchAvailable = value; } + public void setSearchAvailable(boolean value, boolean useAttachMenu) { + this.useAttachMenu = useAttachMenu; + searchAvailable = value; + } + public void setUploadAfterSelect(boolean value) { uploadAfterSelect = value; } @@ -319,7 +325,7 @@ public class ImageUpdater implements NotificationCenter.NotificationCenterDelega return; } if (chatAttachAlert == null) { - chatAttachAlert = new ChatAttachAlert(parentFragment.getParentActivity(), parentFragment); + chatAttachAlert = new ChatAttachAlert(parentFragment.getParentActivity(), parentFragment, forceDarkTheme); chatAttachAlert.setAvatarPicker(canSelectVideo ? 2 : 1, searchAvailable); chatAttachAlert.setDelegate(new ChatAttachAlert.ChatAttachViewDelegate() { @@ -882,4 +888,8 @@ public class ImageUpdater implements NotificationCenter.NotificationCenterDelega parentFragment.getFileLoader().uploadFile(uploadingVideo, false, false, (int) convertingVideo.videoEditedInfo.estimatedSize, ConnectionsManager.FileTypeVideo, false); } } + + public void setForceDarkTheme(boolean forceDarkTheme) { + this.forceDarkTheme = forceDarkTheme; + } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallAlert.java index 4022e1699..a3292eedb 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallAlert.java @@ -39,7 +39,7 @@ import org.telegram.ui.ActionBar.BaseFragment; import org.telegram.ui.ActionBar.BottomSheet; import org.telegram.ui.ActionBar.Theme; import org.telegram.ui.Cells.GroupCreateUserCell; -import org.telegram.ui.ContentPreviewViewer; +import org.telegram.ui.Cells.ShareDialogCell; import java.util.ArrayList; @@ -67,6 +67,7 @@ public class JoinCallAlert extends BottomSheet { private TLRPC.Peer selectedPeer; private TLRPC.Peer currentPeer; private TLRPC.InputPeer selectAfterDismiss; + private boolean schedule; private boolean animationInProgress; @@ -101,21 +102,26 @@ public class JoinCallAlert extends BottomSheet { } public interface JoinCallAlertDelegate { - void didSelectChat(TLRPC.InputPeer peer, boolean hasFewPeers); + void didSelectChat(TLRPC.InputPeer peer, boolean hasFewPeers, boolean schedule); } public class BottomSheetCell extends FrameLayout { private View background; private TextView[] textView = new TextView[2]; - private LinearLayout linearLayout; + private boolean hasBackground; - public BottomSheetCell(Context context) { + public BottomSheetCell(Context context, boolean withoutBackground) { super(context); + hasBackground = !withoutBackground; + setBackground(null); + background = new View(context); - background.setBackground(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(4), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed))); - addView(background, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, 0, 16, 16, 16, 16)); + if (hasBackground) { + background.setBackground(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(4), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed))); + } + addView(background, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, 0, 16, withoutBackground ? 0 : 16, 16, 16)); for (int a = 0; a < 2; a++) { textView[a] = new TextView(context); @@ -124,9 +130,14 @@ public class JoinCallAlert extends BottomSheet { textView[a].setGravity(Gravity.CENTER_HORIZONTAL); textView[a].setEllipsize(TextUtils.TruncateAt.END); textView[a].setGravity(Gravity.CENTER); - textView[a].setTextColor(Theme.getColor(Theme.key_featuredStickers_buttonText)); + if (hasBackground) { + textView[a].setTextColor(Theme.getColor(Theme.key_featuredStickers_buttonText)); + textView[a].setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); + } else { + textView[a].setTextColor(Theme.getColor(Theme.key_featuredStickers_addButton)); + } textView[a].setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); - textView[a].setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); + textView[a].setPadding(0, 0, 0, hasBackground ? 0 : AndroidUtilities.dp(13)); addView(textView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER)); if (a == 1) { textView[a].setAlpha(0.0f); @@ -136,7 +147,7 @@ public class JoinCallAlert extends BottomSheet { @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(80), MeasureSpec.EXACTLY)); + super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(hasBackground ? 80 : 50), MeasureSpec.EXACTLY)); } public void setText(CharSequence text, boolean animated) { @@ -201,16 +212,16 @@ public class JoinCallAlert extends BottomSheet { } } - public static void open(Context context, int did, AccountInstance accountInstance, BaseFragment fragment, int type, JoinCallAlertDelegate delegate) { + public static void open(Context context, int did, AccountInstance accountInstance, BaseFragment fragment, int type, TLRPC.Peer scheduledPeer, JoinCallAlertDelegate delegate) { if (context == null || delegate == null) { return; } if (lastCachedAccount == accountInstance.getCurrentAccount() && lastCacheDid == did && cachedChats != null && SystemClock.elapsedRealtime() - lastCacheTime < 5 * 60 * 1000) { - if (cachedChats.size() == 1) { + if (cachedChats.size() == 1 && type != TYPE_CREATE) { TLRPC.InputPeer peer = accountInstance.getMessagesController().getInputPeer(MessageObject.getPeerId(cachedChats.get(0))); - delegate.didSelectChat(peer, false); + delegate.didSelectChat(peer, false, false); } else { - showAlert(context, cachedChats, fragment, type, delegate); + showAlert(context, did, cachedChats, fragment, type, scheduledPeer, delegate); } } else { final AlertDialog progressDialog = new AlertDialog(context, 3); @@ -226,7 +237,7 @@ public class JoinCallAlert extends BottomSheet { TLRPC.TL_phone_joinAsPeers res = (TLRPC.TL_phone_joinAsPeers) response; if (res.peers.size() == 1) { TLRPC.InputPeer peer = accountInstance.getMessagesController().getInputPeer(MessageObject.getPeerId(res.peers.get(0))); - delegate.didSelectChat(peer, false); + delegate.didSelectChat(peer, false, false); return; } cachedChats = res.peers; @@ -235,7 +246,7 @@ public class JoinCallAlert extends BottomSheet { lastCachedAccount = accountInstance.getCurrentAccount(); accountInstance.getMessagesController().putChats(res.chats, false); accountInstance.getMessagesController().putUsers(res.users, false); - showAlert(context, res.peers, fragment, type, delegate); + showAlert(context, did, res.peers, fragment, type, scheduledPeer, delegate); } })); progressDialog.setOnCancelListener(dialog -> accountInstance.getConnectionsManager().cancelRequest(reqId, true)); @@ -247,8 +258,8 @@ public class JoinCallAlert extends BottomSheet { } } - private static void showAlert(Context context, ArrayList peers, BaseFragment fragment, int type, JoinCallAlertDelegate delegate) { - JoinCallAlert alert = new JoinCallAlert(context, peers, type, delegate); + private static void showAlert(Context context, long dialogId, ArrayList peers, BaseFragment fragment, int type, TLRPC.Peer scheduledPeer, JoinCallAlertDelegate delegate) { + JoinCallAlert alert = new JoinCallAlert(context, dialogId, peers, type, scheduledPeer, delegate); if (fragment != null) { if (fragment.getParentActivity() != null) { fragment.showDialog(alert); @@ -258,14 +269,13 @@ public class JoinCallAlert extends BottomSheet { } } - private JoinCallAlert(Context context, ArrayList chats, int type, JoinCallAlertDelegate delegate) { + private JoinCallAlert(Context context, long dialogId, ArrayList arrayList, int type, TLRPC.Peer scheduledPeer, JoinCallAlertDelegate delegate) { super(context, false); setApplyBottomPadding(false); - this.chats = chats; + chats = new ArrayList<>(arrayList); this.delegate = delegate; currentType = type; - shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate(); if (type == TYPE_DISPLAY) { if (VoIPService.getSharedInstance() != null) { @@ -277,6 +287,15 @@ public class JoinCallAlert extends BottomSheet { break; } } + } else if (scheduledPeer != null) { + long did = MessageObject.getPeerId(scheduledPeer); + for (int a = 0, N = chats.size(); a < N; a++) { + TLRPC.Peer p = chats.get(a); + if (MessageObject.getPeerId(p) == did) { + selectedPeer = currentPeer = p; + break; + } + } } else { selectedPeer = chats.get(0); } @@ -286,77 +305,119 @@ public class JoinCallAlert extends BottomSheet { selectedPeer = chats.get(0); } - containerView = new FrameLayout(context) { + ViewGroup internalLayout; + if (currentType == TYPE_CREATE) { + LinearLayout linearLayout = new LinearLayout(context) { - @Override - public boolean onInterceptTouchEvent(MotionEvent ev) { - if (ev.getAction() == MotionEvent.ACTION_DOWN && scrollOffsetY != 0 && ev.getY() < scrollOffsetY) { - dismiss(); - return true; + boolean sorted; + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + if (currentType == TYPE_CREATE) { + int width = MeasureSpec.getSize(widthMeasureSpec); + int totalWidth = chats.size() * AndroidUtilities.dp(95); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) listView.getLayoutParams(); + if (totalWidth > width) { + layoutParams.width = LayoutHelper.MATCH_PARENT; + layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + if (!sorted) { + if (selectedPeer != null) { + chats.remove(selectedPeer); + chats.add(0, selectedPeer); + } + sorted = true; + } + } else { + layoutParams.width = LayoutHelper.WRAP_CONTENT; + layoutParams.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL; + if (!sorted) { + if (selectedPeer != null) { + int idx; + if (chats.size() % 2 == 0) { + idx = Math.max(0, chats.size() / 2 - 1); + } else { + idx = chats.size() / 2; + } + chats.remove(selectedPeer); + chats.add(idx, selectedPeer); + } + sorted = true; + } + } + } + super.onMeasure(widthMeasureSpec, heightMeasureSpec); } - return super.onInterceptTouchEvent(ev); - } + }; + linearLayout.setOrientation(LinearLayout.VERTICAL); + setCustomView(internalLayout = linearLayout); + } else { + containerView = new FrameLayout(context) { - @Override - public boolean onTouchEvent(MotionEvent e) { - return !isDismissed() && super.onTouchEvent(e); - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - int height = MeasureSpec.getSize(heightMeasureSpec); - if (Build.VERSION.SDK_INT >= 21) { - height -= AndroidUtilities.statusBarHeight; + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (ev.getAction() == MotionEvent.ACTION_DOWN && scrollOffsetY != 0 && ev.getY() < scrollOffsetY) { + dismiss(); + return true; + } + return super.onInterceptTouchEvent(ev); } - measureChildWithMargins(messageTextView, widthMeasureSpec, 0, heightMeasureSpec, 0); - int h = messageTextView.getMeasuredHeight(); - ((LayoutParams) listView.getLayoutParams()).topMargin = AndroidUtilities.dp(65) + h; - int measuredWidth = getMeasuredWidth(); - int padding; - int contentSize = AndroidUtilities.dp(80) + chats.size() * AndroidUtilities.dp(58) + backgroundPaddingTop + AndroidUtilities.dp(55) + h; - if (contentSize < height / 5 * 3) { - padding = height - contentSize; - } else { - padding = height / 5 * 2; - } - if (listView.getPaddingTop() != padding) { - ignoreLayout = true; - listView.setPadding(0, padding, 0, 0); - ignoreLayout = false; - } - super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)); - } - @Override - protected void onLayout(boolean changed, int left, int top, int right, int bottom) { - super.onLayout(changed, left, top, right, bottom); - updateLayout(); - } - - @Override - public void requestLayout() { - if (ignoreLayout) { - return; + @Override + public boolean onTouchEvent(MotionEvent e) { + return !isDismissed() && super.onTouchEvent(e); } - super.requestLayout(); - } - @Override - protected void onDraw(Canvas canvas) { - shadowDrawable.setBounds(0, scrollOffsetY - backgroundPaddingTop, getMeasuredWidth(), getMeasuredHeight()); - shadowDrawable.draw(canvas); - } - }; - containerView.setWillNotDraw(false); - containerView.setPadding(backgroundPaddingLeft, 0, backgroundPaddingLeft, 0); + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + int height = MeasureSpec.getSize(heightMeasureSpec); + if (Build.VERSION.SDK_INT >= 21) { + height -= AndroidUtilities.statusBarHeight; + } + measureChildWithMargins(messageTextView, widthMeasureSpec, 0, heightMeasureSpec, 0); + int h = messageTextView.getMeasuredHeight(); + ((LayoutParams) listView.getLayoutParams()).topMargin = AndroidUtilities.dp(65) + h; + int measuredWidth = getMeasuredWidth(); + int padding; + int contentSize = AndroidUtilities.dp(80) + chats.size() * AndroidUtilities.dp(58) + backgroundPaddingTop + AndroidUtilities.dp(55) + h; + if (contentSize < height / 5 * 3) { + padding = height - contentSize; + } else { + padding = height / 5 * 2; + } + if (listView.getPaddingTop() != padding) { + ignoreLayout = true; + listView.setPadding(0, padding, 0, 0); + ignoreLayout = false; + } + super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)); + } + + @Override + protected void onLayout(boolean changed, int left, int top, int right, int bottom) { + super.onLayout(changed, left, top, right, bottom); + updateLayout(); + } + + @Override + public void requestLayout() { + if (ignoreLayout) { + return; + } + super.requestLayout(); + } + + @Override + protected void onDraw(Canvas canvas) { + shadowDrawable.setBounds(0, scrollOffsetY - backgroundPaddingTop, getMeasuredWidth(), getMeasuredHeight()); + shadowDrawable.draw(canvas); + } + }; + internalLayout = containerView; + containerView.setWillNotDraw(false); + containerView.setPadding(backgroundPaddingLeft, 0, backgroundPaddingLeft, 0); + } listView = new RecyclerListView(context) { - @Override - public boolean onInterceptTouchEvent(MotionEvent event) { - boolean result = ContentPreviewViewer.getInstance().onInterceptTouchEvent(event, listView, 0, null); - return super.onInterceptTouchEvent(event) || result; - } - @Override public void requestLayout() { if (ignoreLayout) { @@ -365,7 +426,7 @@ public class JoinCallAlert extends BottomSheet { super.requestLayout(); } }; - listView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false)); + listView.setLayoutManager(new LinearLayoutManager(getContext(), currentType == TYPE_CREATE ? LinearLayoutManager.HORIZONTAL : LinearLayoutManager.VERTICAL, false)); listView.setAdapter(new ListAdapter(context)); listView.setVerticalScrollBarEnabled(false); listView.setClipToPadding(false); @@ -381,18 +442,41 @@ public class JoinCallAlert extends BottomSheet { if (animationInProgress || chats.get(position) == selectedPeer) { return; } - GroupCreateUserCell cell = (GroupCreateUserCell) view; selectedPeer = chats.get(position); - cell.setChecked(true, true); + if (view instanceof GroupCreateUserCell) { + ((GroupCreateUserCell) view).setChecked(true, true); + } else if (view instanceof ShareDialogCell) { + ((ShareDialogCell) view).setChecked(true, true); + view.invalidate(); + } for (int a = 0, N = listView.getChildCount(); a < N; a++) { - GroupCreateUserCell child = (GroupCreateUserCell) listView.getChildAt(a); - if (child != cell) { - child.setChecked(false, true); + View child = listView.getChildAt(a); + if (child != view) { + if (view instanceof GroupCreateUserCell) { + ((GroupCreateUserCell) child).setChecked(false, true); + } else if (view instanceof ShareDialogCell) { + ((ShareDialogCell) child).setChecked(false, true); + } } } - updateDoneButton(true); + if (currentType != TYPE_CREATE) { + updateDoneButton(true); + } }); - containerView.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 100, 0, 80)); + if (type != TYPE_CREATE) { + internalLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 100, 0, 80)); + } else { + listView.setSelectorDrawableColor(0); + listView.setPadding(AndroidUtilities.dp(10), 0, AndroidUtilities.dp(10), 0); + } + + if (type == TYPE_CREATE) { + RLottieImageView imageView = new RLottieImageView(context); + imageView.setAutoRepeat(true); + imageView.setAnimation(R.raw.utyan_schedule, 120, 120); + imageView.playAnimation(); + internalLayout.addView(imageView, LayoutHelper.createLinear(160, 160, Gravity.CENTER_HORIZONTAL | Gravity.TOP, 17, 8, 17, 0)); + } textView = new TextView(context); textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); @@ -402,16 +486,19 @@ public class JoinCallAlert extends BottomSheet { } else { textView.setTextColor(Theme.getColor(Theme.key_dialogTextBlack)); } - if (type == TYPE_DISPLAY) { - textView.setText(LocaleController.getString("VoipGroupDisplayAs", R.string.VoipGroupDisplayAs)); - } else if (type == TYPE_CREATE) { - textView.setText(LocaleController.getString("VoipGroupStartAs", R.string.VoipGroupStartAs)); - } else { - textView.setText(LocaleController.getString("VoipGroupJoinAs", R.string.VoipGroupJoinAs)); - } textView.setSingleLine(true); textView.setEllipsize(TextUtils.TruncateAt.END); - containerView.addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 23, 0, 23, 0)); + if (type == TYPE_CREATE) { + textView.setText(LocaleController.getString("StartVoipChatTitle", R.string.StartVoipChatTitle)); + internalLayout.addView(textView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 23, 16, 23, 0)); + } else { + if (type == TYPE_DISPLAY) { + textView.setText(LocaleController.getString("VoipGroupDisplayAs", R.string.VoipGroupDisplayAs)); + } else { + textView.setText(LocaleController.getString("VoipGroupJoinAs", R.string.VoipGroupJoinAs)); + } + internalLayout.addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 23, 8, 23, 0)); + } messageTextView = new TextView(getContext()); if (type == TYPE_DISPLAY) { @@ -431,45 +518,86 @@ public class JoinCallAlert extends BottomSheet { } } } - if (hasGroup) { - messageTextView.setText(LocaleController.getString("VoipGroupStartAsInfoGroup", R.string.VoipGroupStartAsInfoGroup)); - } else { - messageTextView.setText(LocaleController.getString("VoipGroupStartAsInfo", R.string.VoipGroupStartAsInfo)); - } messageTextView.setMovementMethod(new AndroidUtilities.LinkMovementMethodMy()); messageTextView.setLinkTextColor(Theme.getColor(Theme.key_dialogTextLink)); - messageTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP); - containerView.addView(messageTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 23, 0, 23, 5)); + if (type == TYPE_CREATE) { + TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat((int) -dialogId); + StringBuilder builder = new StringBuilder(); + if (ChatObject.isChannel(chat) && !chat.megagroup) { + builder.append(LocaleController.getString("VoipChannelStart2", R.string.VoipChannelStart2)); + } else { + builder.append(LocaleController.getString("VoipGroupStart2", R.string.VoipGroupStart2)); + } + if (chats.size() > 1) { + builder.append("\n\n").append(LocaleController.getString("VoipChatDisplayedAs", R.string.VoipChatDisplayedAs)); + } else { + listView.setVisibility(View.GONE); + } + messageTextView.setText(builder); + messageTextView.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.TOP); + internalLayout.addView(messageTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 23, 0, 23, 5)); + } else { + if (hasGroup) { + messageTextView.setText(LocaleController.getString("VoipGroupStartAsInfoGroup", R.string.VoipGroupStartAsInfoGroup)); + } else { + messageTextView.setText(LocaleController.getString("VoipGroupStartAsInfo", R.string.VoipGroupStartAsInfo)); + } + messageTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP); + internalLayout.addView(messageTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 23, 0, 23, 5)); + } - doneButton = new BottomSheetCell(context); - doneButton.setBackground(null); + if (type == TYPE_CREATE) { + internalLayout.addView(listView, LayoutHelper.createLinear(chats.size() < 5 ? LayoutHelper.WRAP_CONTENT : LayoutHelper.MATCH_PARENT, 95, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 6, 0, 0)); + } + + doneButton = new BottomSheetCell(context, false); doneButton.background.setOnClickListener(v -> { TLRPC.InputPeer peer = MessagesController.getInstance(currentAccount).getInputPeer(MessageObject.getPeerId(selectedPeer)); if (currentType == TYPE_DISPLAY) { if (selectedPeer != currentPeer) { - delegate.didSelectChat(peer, chats.size() > 1); + delegate.didSelectChat(peer, chats.size() > 1, false); } } else { selectAfterDismiss = peer; } dismiss(); }); - containerView.addView(doneButton, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.BOTTOM, 0, 0, 0, 0)); + if (currentType == TYPE_CREATE) { + internalLayout.addView(doneButton, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0)); + + BottomSheetCell scheduleButton = new BottomSheetCell(context, true); + scheduleButton.setText(LocaleController.getString("VoipGroupScheduleVoiceChat", R.string.VoipGroupScheduleVoiceChat), false); + scheduleButton.background.setOnClickListener(v -> { + selectAfterDismiss = MessagesController.getInstance(currentAccount).getInputPeer(MessageObject.getPeerId(selectedPeer)); + schedule = true; + dismiss(); + }); + internalLayout.addView(scheduleButton, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0)); + } else { + internalLayout.addView(doneButton, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.BOTTOM, 0, 0, 0, 0)); + } updateDoneButton(false); } private void updateDoneButton(boolean animated) { - int did = MessageObject.getPeerId(selectedPeer); - if (did > 0) { - TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(did); - doneButton.setText(LocaleController.formatString("VoipGroupContinueAs", R.string.VoipGroupContinueAs, UserObject.getFirstName(user)), animated); + if (currentType == TYPE_CREATE) { + doneButton.setText(LocaleController.formatString("VoipGroupStartVoiceChat", R.string.VoipGroupStartVoiceChat), animated); } else { - TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-did); - doneButton.setText(LocaleController.formatString("VoipGroupContinueAs", R.string.VoipGroupContinueAs, chat != null ? chat.title : ""), animated); + int did = MessageObject.getPeerId(selectedPeer); + if (did > 0) { + TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(did); + doneButton.setText(LocaleController.formatString("VoipGroupContinueAs", R.string.VoipGroupContinueAs, UserObject.getFirstName(user)), animated); + } else { + TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-did); + doneButton.setText(LocaleController.formatString("VoipGroupContinueAs", R.string.VoipGroupContinueAs, chat != null ? chat.title : ""), animated); + } } } private void updateLayout() { + if (currentType == TYPE_CREATE) { + return; + } if (listView.getChildCount() <= 0) { listView.setTopGlowOffset(scrollOffsetY = listView.getPaddingTop()); containerView.invalidate(); @@ -491,7 +619,7 @@ public class JoinCallAlert extends BottomSheet { public void dismissInternal() { super.dismissInternal(); if (selectAfterDismiss != null) { - delegate.didSelectChat(selectAfterDismiss, chats.size() > 1); + delegate.didSelectChat(selectAfterDismiss, chats.size() > 1, schedule); } } @@ -525,30 +653,41 @@ public class JoinCallAlert extends BottomSheet { @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { - View view = new GroupCreateUserCell(context, 2, 0, false, currentType == TYPE_DISPLAY); + View view; + if (currentType == TYPE_CREATE) { + view = new ShareDialogCell(context, ShareDialogCell.TYPE_CREATE); + view.setLayoutParams(new RecyclerView.LayoutParams(AndroidUtilities.dp(80), AndroidUtilities.dp(100))); + } else { + view = new GroupCreateUserCell(context, 2, 0, false, currentType == TYPE_DISPLAY); + } return new RecyclerListView.Holder(view); } @Override public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) { int position = holder.getAdapterPosition(); - GroupCreateUserCell cell = (GroupCreateUserCell) holder.itemView; - Object object = cell.getObject(); - if (object != null) { - int did = MessageObject.getPeerId(selectedPeer); - int id; - if (object instanceof TLRPC.Chat) { - id = -((TLRPC.Chat) object).id; - } else { - id = ((TLRPC.User) object).id; + long did = MessageObject.getPeerId(selectedPeer); + if (holder.itemView instanceof GroupCreateUserCell) { + GroupCreateUserCell cell = (GroupCreateUserCell) holder.itemView; + Object object = cell.getObject(); + long id = 0; + if (object != null) { + if (object instanceof TLRPC.Chat) { + id = -((TLRPC.Chat) object).id; + } else { + id = ((TLRPC.User) object).id; + } } cell.setChecked(did == id, false); + } else { + ShareDialogCell cell = (ShareDialogCell) holder.itemView; + long id = cell.getCurrentDialog(); + cell.setChecked(did == id, false); } } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { - GroupCreateUserCell cell = (GroupCreateUserCell) holder.itemView; int did = MessageObject.getPeerId(chats.get(position)); TLObject object; String status; @@ -559,7 +698,13 @@ public class JoinCallAlert extends BottomSheet { object = MessagesController.getInstance(currentAccount).getChat(-did); status = null; } - cell.setObject(object, null, status, position != getItemCount() - 1); + if (currentType == TYPE_CREATE) { + ShareDialogCell cell = (ShareDialogCell) holder.itemView; + cell.setDialog(did, did == MessageObject.getPeerId(selectedPeer), null); + } else { + GroupCreateUserCell cell = (GroupCreateUserCell) holder.itemView; + cell.setObject(object, null, status, position != getItemCount() - 1); + } } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallByUrlAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallByUrlAlert.java index 669b20453..7596f5f7d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallByUrlAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinCallByUrlAlert.java @@ -80,7 +80,7 @@ public class JoinCallByUrlAlert extends BottomSheet { linearLayout.addView(avatarImageView, LayoutHelper.createLinear(90, 90, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 29, 0, 0)); AvatarDrawable avatarDrawable = new AvatarDrawable(chat); - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); TextView percentTextView = new TextView(context); percentTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinGroupAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinGroupAlert.java index 6f9813fd7..1ca621e0b 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinGroupAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/JoinGroupAlert.java @@ -68,7 +68,7 @@ public class JoinGroupAlert extends BottomSheet { avatarDrawable = new AvatarDrawable(invite.chat); title = invite.chat.title; participants_count = invite.chat.participants_count; - avatarImageView.setImage(ImageLocation.getForChat(invite.chat, false), "50_50", avatarDrawable, invite); + avatarImageView.setImage(ImageLocation.getForUserOrChat(invite.chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(invite.chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, invite); } else { avatarDrawable = new AvatarDrawable(); avatarDrawable.setInfo(0, invite.title, null); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/NumberPicker.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/NumberPicker.java index ecad7aa38..e10abe87c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/NumberPicker.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/NumberPicker.java @@ -232,6 +232,7 @@ public class NumberPicker extends LinearLayout { public NumberPicker(Context context) { this(context, 18); } + public NumberPicker(Context context, int textSize) { super(context); mTextSize = AndroidUtilities.dp(textSize); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/PhonebookShareAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/PhonebookShareAlert.java index 4e0aeca48..114f7a971 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/PhonebookShareAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/PhonebookShareAlert.java @@ -117,7 +117,7 @@ public class PhonebookShareAlert extends BottomSheet { BackupImageView avatarImageView = new BackupImageView(context); avatarImageView.setRoundRadius(AndroidUtilities.dp(40)); - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); addView(avatarImageView, LayoutHelper.createLinear(80, 80, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 32, 0, 0)); TextView textView = new TextView(context); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/PollVotesAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/PollVotesAlert.java index 3e995aac7..8d4955509 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/PollVotesAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/PollVotesAlert.java @@ -375,7 +375,7 @@ public class PollVotesAlert extends BottomSheet { lastAvatar = photo; if (currentUser != null) { - avatarImageView.setImage(ImageLocation.getForUser(currentUser, false), "50_50", avatarDrawable, currentUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, currentUser); } else { avatarImageView.setImageDrawable(avatarDrawable); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ProfileGalleryView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ProfileGalleryView.java index 0686f3e09..a716ee0fb 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ProfileGalleryView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ProfileGalleryView.java @@ -13,7 +13,6 @@ import android.graphics.PointF; import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.text.TextUtils; -import android.util.Log; import android.util.SparseArray; import android.view.MotionEvent; import android.view.View; @@ -31,6 +30,7 @@ import org.telegram.messenger.UserConfig; import org.telegram.tgnet.ConnectionsManager; import org.telegram.tgnet.TLRPC; import org.telegram.ui.ActionBar.ActionBar; +import org.telegram.ui.PinchToZoomHelper; import org.telegram.ui.ProfileActivity; import java.util.ArrayList; @@ -55,6 +55,7 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio private boolean scrolledByUser; private boolean isDownReleased; private final boolean isProfileFragment; + private ImageLocation uploadingImageLocation; private int currentAccount = UserConfig.selectedAccount; @@ -70,21 +71,29 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio private ArrayList imagesLocations = new ArrayList<>(); private ArrayList thumbsLocations = new ArrayList<>(); private ArrayList imagesLocationsSizes = new ArrayList<>(); + private ArrayList imagesUploadProgress = new ArrayList<>(); private int settingMainPhoto; private final SparseArray radialProgresses = new SparseArray<>(); - private OnPageChangeListener onPageChangeListener; + private boolean createThumbFromParent = true; + private boolean forceResetPosition; + private boolean invalidateWithParent; + + PinchToZoomHelper pinchToZoomHelper; private static class Item { - private BackupImageView imageView; + private AvatarImageView imageView; } public interface Callback { void onDown(boolean left); + void onRelease(); + void onPhotosLoaded(); + void onVideoSet(); } @@ -238,7 +247,6 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio MessagesController.getInstance(currentAccount).loadDialogPhotos((int) dialogId, 80, 0, true, parentClassGuid); } - public void onDestroy() { NotificationCenter.getInstance(currentAccount).removeObserver(this, NotificationCenter.dialogPhotosLoaded); NotificationCenter.getInstance(currentAccount).removeObserver(this, NotificationCenter.fileDidLoad); @@ -302,8 +310,21 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio cancelEvent.recycle(); return false; } - final int action = ev.getAction(); + + if (pinchToZoomHelper != null) { + if (action != MotionEvent.ACTION_DOWN && isDownReleased && !pinchToZoomHelper.isInOverlayMode()) { + pinchToZoomHelper.checkPinchToZoom(MotionEvent.obtain(0, 0, MotionEvent.ACTION_CANCEL, 0, 0, 0), this, getCurrentItemView().getImageReceiver(), null); + } else if (pinchToZoomHelper.checkPinchToZoom(ev, this, getCurrentItemView().getImageReceiver(), null)) { + if (!isDownReleased) { + isDownReleased = true; + callback.onRelease(); + } + return true; + } + } + + if (action == MotionEvent.ACTION_DOWN) { isScrollingListView = true; isSwipingViewPager = true; @@ -393,6 +414,7 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio videoLocations.set(0, null); videoFileNames.add(0, null); } + imagesUploadProgress.set(0, null); adapter.notifyDataSetChanged(); } } @@ -402,8 +424,13 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio return false; } if (prevImageLocation == null || prevImageLocation.location.local_id != imageLocation.location.local_id) { - imagesLocations.clear(); - MessagesController.getInstance(currentAccount).loadDialogPhotos((int) dialogId, 80, 0, true, parentClassGuid); + if (!imagesLocations.isEmpty()) { + prevImageLocation = imageLocation; + MessagesController.getInstance(currentAccount).loadDialogPhotos((int) dialogId, 80, 0, true, parentClassGuid); + return true; + } else { + MessagesController.getInstance(currentAccount).loadDialogPhotos((int) dialogId, 80, 0, true, parentClassGuid); + } } if (!imagesLocations.isEmpty()) { return false; @@ -416,11 +443,39 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio videoLocations.add(null); photos.add(null); imagesLocationsSizes.add(-1); + imagesUploadProgress.add(null); getAdapter().notifyDataSetChanged(); - resetCurrentItem(); + // resetCurrentItem(); return true; } + ImageLocation currentUploadingImageLocation; + ImageLocation curreantUploadingThumbLocation; + + public void addUploadingImage(ImageLocation imageLocation, ImageLocation thumbLocation) { + prevImageLocation = imageLocation; + thumbsFileNames.add(0, null); + videoFileNames.add(0, null); + imagesLocations.add(0, imageLocation); + thumbsLocations.add(0, thumbLocation); + videoLocations.add(0, null); + photos.add(0, null); + imagesLocationsSizes.add(0, -1); + imagesUploadProgress.add(0, 0f); + adapter.notifyDataSetChanged(); + resetCurrentItem(); + + currentUploadingImageLocation = imageLocation; + curreantUploadingThumbLocation = thumbLocation; + + } + + public void removeUploadingImage(ImageLocation imageLocation) { + uploadingImageLocation = imageLocation; + currentUploadingImageLocation = null; + curreantUploadingThumbLocation = null; + } + public ImageLocation getImageLocation(int index) { if (index < 0 || index >= imagesLocations.size()) { return null; @@ -576,6 +631,10 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio imagesLocationsSizes.remove(index); imagesLocationsSizes.add(0, size); + Float uploadProgress = imagesUploadProgress.get(index); + imagesUploadProgress.remove(index); + imagesUploadProgress.add(0, uploadProgress); + prevImageLocation = imagesLocations.get(0); } @@ -596,6 +655,7 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio thumbsLocations.remove(index); imagesLocationsSizes.remove(index); radialProgresses.delete(index); + imagesUploadProgress.remove(index); if (index == 0 && !imagesLocations.isEmpty()) { prevImageLocation = imagesLocations.get(0); } @@ -640,13 +700,14 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio thumbsLocations.clear(); photos.clear(); imagesLocationsSizes.clear(); + imagesUploadProgress.clear(); ImageLocation currentImageLocation = null; if (did < 0) { TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-did); - currentImageLocation = ImageLocation.getForChat(chat, true); + currentImageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_BIG); if (currentImageLocation != null) { imagesLocations.add(currentImageLocation); - thumbsLocations.add(ImageLocation.getForChat(chat, false)); + thumbsLocations.add(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL)); thumbsFileNames.add(null); if (chatInfo != null && FileLoader.isSamePhoto(currentImageLocation.location, chatInfo.chat_photo)) { photos.add(chatInfo.chat_photo); @@ -664,6 +725,7 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio videoLocations.add(null); } imagesLocationsSizes.add(-1); + imagesUploadProgress.add(null); } } for (int a = 0; a < arrayList.size(); a++) { @@ -717,20 +779,24 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio } photos.add(photo); imagesLocationsSizes.add(sizeFull.size); + imagesUploadProgress.add(null); } } } loadNeighboringThumbs(); getAdapter().notifyDataSetChanged(); if (isProfileFragment) { - if (!scrolledByUser) { + if (!scrolledByUser || forceResetPosition) { resetCurrentItem(); } } else { - resetCurrentItem(); - getAdapter().notifyDataSetChanged(); + if (!scrolledByUser || forceResetPosition) { + resetCurrentItem(); + getAdapter().notifyDataSetChanged(); + } } + forceResetPosition = false; if (fromCache) { MessagesController.getInstance(currentAccount).loadDialogPhotos(did, 80, 0, false, parentClassGuid); @@ -738,6 +804,9 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio if (callback != null) { callback.onPhotosLoaded(); } + if (currentUploadingImageLocation != null) { + addUploadingImage(currentUploadingImageLocation, curreantUploadingThumbLocation); + } } } else if (id == NotificationCenter.fileDidLoad) { final String fileName = (String) args[0]; @@ -817,147 +886,7 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio final Item item = objects.get(position); if (item.imageView == null) { - item.imageView = new BackupImageView(context) { - - private final int radialProgressSize = AndroidUtilities.dp(64f); - - private RadialProgress2 radialProgress; - private ValueAnimator radialProgressHideAnimator; - private float radialProgressHideAnimatorStartValue; - private long firstDrawTime = -1; - private boolean isVideo; - - { - getImageReceiver().setAllowDecodeSingleFrame(true); - final int realPosition = getRealPosition(position); - boolean needProgress = false; - if (realPosition == 0) { - Drawable drawable = parentAvatarImageView == null ? null : parentAvatarImageView.getImageReceiver().getDrawable(); - if (drawable instanceof AnimatedFileDrawable && ((AnimatedFileDrawable) drawable).hasBitmap()) { - AnimatedFileDrawable animatedFileDrawable = (AnimatedFileDrawable) drawable; - setImageDrawable(drawable); - animatedFileDrawable.addSecondParentView(this); - animatedFileDrawable.setInvalidateParentViewWithSecond(true); - } else { - ImageLocation videoLocation = videoLocations.get(realPosition); - isVideo = videoLocation != null; - needProgress = true; - String filter; - if (isProfileFragment && videoLocation != null && videoLocation.imageType == FileLoader.IMAGE_TYPE_ANIMATION) { - filter = ImageLoader.AUTOPLAY_FILTER; - } else { - filter = null; - } - Bitmap thumb = parentAvatarImageView == null ? null : parentAvatarImageView.getImageReceiver().getBitmap(); - setImageMedia(videoLocations.get(realPosition), filter, imagesLocations.get(realPosition), null, thumb, imagesLocationsSizes.get(realPosition), 1, "avatar_" + dialogId); - } - } else { - final ImageLocation videoLocation = videoLocations.get(realPosition); - isVideo = videoLocation != null; - needProgress = true; - ImageLocation location = thumbsLocations.get(realPosition); - String filter = location.photoSize instanceof TLRPC.TL_photoStrippedSize ? "b" : null; - setImageMedia(videoLocation, null, imagesLocations.get(realPosition), null, thumbsLocations.get(realPosition), filter, null, imagesLocationsSizes.get(realPosition), 1, location); - } - if (needProgress) { - radialProgress = radialProgresses.get(realPosition); - if (radialProgress == null) { - radialProgress = new RadialProgress2(this); - radialProgress.setOverrideAlpha(0.0f); - radialProgress.setIcon(MediaActionDrawable.ICON_EMPTY, false, false); - radialProgress.setColors(0x42000000, 0x42000000, Color.WHITE, Color.WHITE); - radialProgresses.append(realPosition, radialProgress); - } - postInvalidateOnAnimation(); - } - getImageReceiver().setDelegate(new ImageReceiver.ImageReceiverDelegate() { - @Override - public void didSetImage(ImageReceiver imageReceiver, boolean set, boolean thumb, boolean memCache) { - - } - - @Override - public void onAnimationReady(ImageReceiver imageReceiver) { - callback.onVideoSet(); - } - }); - getImageReceiver().setCrossfadeAlpha((byte) 2); - } - - @Override - protected void onSizeChanged(int w, int h, int oldw, int oldh) { - super.onSizeChanged(w, h, oldw, oldh); - if (radialProgress != null) { - int paddingTop = (parentActionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + ActionBar.getCurrentActionBarHeight(); - int paddingBottom = AndroidUtilities.dp2(80f); - radialProgress.setProgressRect((w - radialProgressSize) / 2, paddingTop + (h - paddingTop - paddingBottom - radialProgressSize) / 2, (w + radialProgressSize) / 2, paddingTop + (h - paddingTop - paddingBottom + radialProgressSize) / 2); - } - } - - @Override - protected void onDraw(Canvas canvas) { - if (radialProgress != null) { - final Drawable drawable = getImageReceiver().getDrawable(); - if (drawable != null && (!isVideo || (drawable instanceof AnimatedFileDrawable && ((AnimatedFileDrawable) drawable).getDurationMs() > 0))) { - if (radialProgressHideAnimator == null) { - long startDelay = 0; - if (radialProgress.getProgress() < 1f) { - radialProgress.setProgress(1f, true); - startDelay = 100; - } - radialProgressHideAnimatorStartValue = radialProgress.getOverrideAlpha(); - radialProgressHideAnimator = ValueAnimator.ofFloat(0f, 1f); - radialProgressHideAnimator.setStartDelay(startDelay); - radialProgressHideAnimator.setDuration((long) (radialProgressHideAnimatorStartValue * 250f)); - radialProgressHideAnimator.setInterpolator(CubicBezierInterpolator.DEFAULT); - radialProgressHideAnimator.addUpdateListener(anim -> radialProgress.setOverrideAlpha(AndroidUtilities.lerp(radialProgressHideAnimatorStartValue, 0f, anim.getAnimatedFraction()))); - radialProgressHideAnimator.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - radialProgress = null; - radialProgresses.delete(getRealPosition(position)); - } - }); - radialProgressHideAnimator.start(); - } - } else { - if (firstDrawTime < 0) { - firstDrawTime = System.currentTimeMillis(); - } else { - final long elapsedTime = System.currentTimeMillis() - firstDrawTime; - final long startDelay = isVideo ? 250 : 750; - final long duration = 250; - if (elapsedTime <= startDelay + duration) { - if (elapsedTime > startDelay) { - radialProgress.setOverrideAlpha(CubicBezierInterpolator.DEFAULT.getInterpolation((elapsedTime - startDelay) / (float) duration)); - } - } - } - postInvalidateOnAnimation(); - } - if (roundTopRadius == 0 && roundBottomRadius == 0) { - canvas.drawRect(0, 0, getWidth(), getHeight(), placeholderPaint); - } else if (roundTopRadius == roundBottomRadius) { - rect.set(0, 0, getWidth(), getHeight()); - canvas.drawRoundRect(rect, roundTopRadius, roundTopRadius, placeholderPaint); - } else { - path.reset(); - rect.set(0, 0, getWidth(), getHeight()); - for (int i = 0; i < 4; i++) { - radii[i] = roundTopRadius; - radii[4 + i] = roundBottomRadius; - } - path.addRoundRect(rect, radii, Path.Direction.CW); - canvas.drawPath(path, placeholderPaint); - } - } - super.onDraw(canvas); - - if (radialProgress != null && radialProgress.getOverrideAlpha() > 0f) { - radialProgress.draw(canvas); - } - } - }; + item.imageView = new AvatarImageView(context, position, placeholderPaint); imageViews.set(position, item.imageView); } @@ -965,6 +894,76 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio container.addView(item.imageView); } + item.imageView.getImageReceiver().setAllowDecodeSingleFrame(true); + final int realPosition = getRealPosition(position); + boolean needProgress = false; + if (realPosition == 0) { + Drawable drawable = parentAvatarImageView == null ? null : parentAvatarImageView.getImageReceiver().getDrawable(); + if (drawable instanceof AnimatedFileDrawable && ((AnimatedFileDrawable) drawable).hasBitmap()) { + AnimatedFileDrawable animatedFileDrawable = (AnimatedFileDrawable) drawable; + item.imageView.setImageDrawable(drawable); + animatedFileDrawable.addSecondParentView(item.imageView); + animatedFileDrawable.setInvalidateParentViewWithSecond(true); + } else { + ImageLocation videoLocation = videoLocations.get(realPosition); + item.imageView.isVideo = videoLocation != null; + needProgress = true; + String filter; + if (isProfileFragment && videoLocation != null && videoLocation.imageType == FileLoader.IMAGE_TYPE_ANIMATION) { + filter = ImageLoader.AUTOPLAY_FILTER; + } else { + filter = null; + } + ImageLocation location = thumbsLocations.get(realPosition); + Bitmap thumb = (parentAvatarImageView == null || !createThumbFromParent) ? null : parentAvatarImageView.getImageReceiver().getBitmap(); + if (thumb != null) { + item.imageView.setImageMedia(videoLocations.get(realPosition), filter, imagesLocations.get(realPosition), null, thumb, imagesLocationsSizes.get(realPosition), 1, location); + } else if (uploadingImageLocation != null) { + item.imageView.setImageMedia(videoLocations.get(realPosition), filter, imagesLocations.get(realPosition), null, uploadingImageLocation, null, null, imagesLocationsSizes.get(realPosition), 1, location); + } else { + String thumbFilter = location.photoSize instanceof TLRPC.TL_photoStrippedSize ? "b" : null; + item.imageView.setImageMedia(videoLocation, null, imagesLocations.get(realPosition), null, thumbsLocations.get(realPosition), thumbFilter, null, imagesLocationsSizes.get(realPosition), 1, location); + } + } + } else { + final ImageLocation videoLocation = videoLocations.get(realPosition); + item.imageView.isVideo = videoLocation != null; + needProgress = true; + ImageLocation location = thumbsLocations.get(realPosition); + String filter = location.photoSize instanceof TLRPC.TL_photoStrippedSize ? "b" : null; + item.imageView.setImageMedia(videoLocation, null, imagesLocations.get(realPosition), null, thumbsLocations.get(realPosition), filter, null, imagesLocationsSizes.get(realPosition), 1, location); + } + if (imagesUploadProgress.get(realPosition) != null) { + needProgress = true; + } + if (needProgress) { + item.imageView.radialProgress = radialProgresses.get(realPosition); + if (item.imageView.radialProgress == null) { + item.imageView.radialProgress = new RadialProgress2(item.imageView); + item.imageView.radialProgress.setOverrideAlpha(0.0f); + item.imageView.radialProgress.setIcon(MediaActionDrawable.ICON_EMPTY, false, false); + item.imageView.radialProgress.setColors(0x42000000, 0x42000000, Color.WHITE, Color.WHITE); + radialProgresses.append(realPosition, item.imageView.radialProgress); + } + if (invalidateWithParent) { + invalidate(); + } else { + postInvalidateOnAnimation(); + } + } + item.imageView.getImageReceiver().setDelegate(new ImageReceiver.ImageReceiverDelegate() { + @Override + public void didSetImage(ImageReceiver imageReceiver, boolean set, boolean thumb, boolean memCache) { + + } + + @Override + public void onAnimationReady(ImageReceiver imageReceiver) { + callback.onVideoSet(); + } + }); + item.imageView.getImageReceiver().setCrossfadeAlpha((byte) 2); + item.imageView.setRoundRadius(roundTopRadius, roundTopRadius, roundBottomRadius, roundBottomRadius); return item; @@ -981,6 +980,7 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio } imageView.setRoundRadius(0); container.removeView(imageView); + imageView.getImageReceiver().cancelLoadImage(); } @Nullable @@ -1021,6 +1021,8 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio resetCurrentItem(); return; } + forceResetPosition = true; + adapter.notifyDataSetChanged(); reset(); this.dialogId = dialogId; MessagesController.getInstance(currentAccount).loadDialogPhotos((int) dialogId, 80, 0, true, parentClassGuid); @@ -1034,8 +1036,9 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio imagesLocations.clear(); thumbsLocations.clear(); imagesLocationsSizes.clear(); + imagesUploadProgress.clear(); adapter.notifyDataSetChanged(); - resetCurrentItem(); + uploadingImageLocation = null; } public void setRoundRadius(int topRadius, int bottomRadius) { @@ -1055,4 +1058,150 @@ public class ProfileGalleryView extends CircularViewPager implements Notificatio adapter.parentAvatarImageView = parentImageView; } } + + public void setUploadProgress(ImageLocation imageLocation, float p) { + if (imageLocation == null) { + return; + } + for (int i = 0; i < imagesLocations.size(); i++) { + if (imagesLocations.get(i) == imageLocation) { + imagesUploadProgress.set(i, p); + if (radialProgresses.get(i) != null) { + radialProgresses.get(i).setProgress(p, true); + } + break; + } + } + for (int i = 0; i < getChildCount(); i++) { + getChildAt(i).invalidate(); + } + } + + public void setCreateThumbFromParent(boolean createThumbFromParent) { + this.createThumbFromParent = createThumbFromParent; + } + + private class AvatarImageView extends BackupImageView { + + private final int radialProgressSize = AndroidUtilities.dp(64f); + + private RadialProgress2 radialProgress; + private ValueAnimator radialProgressHideAnimator; + private float radialProgressHideAnimatorStartValue; + private long firstDrawTime = -1; + public boolean isVideo; + private final int position; + private final Paint placeholderPaint; + + public AvatarImageView(Context context, int position, Paint placeholderPaint) { + super(context); + this.position = position; + this.placeholderPaint = placeholderPaint; + } + + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + super.onSizeChanged(w, h, oldw, oldh); + if (radialProgress != null) { + int paddingTop = (parentActionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + ActionBar.getCurrentActionBarHeight(); + int paddingBottom = AndroidUtilities.dp2(80f); + radialProgress.setProgressRect((w - radialProgressSize) / 2, paddingTop + (h - paddingTop - paddingBottom - radialProgressSize) / 2, (w + radialProgressSize) / 2, paddingTop + (h - paddingTop - paddingBottom + radialProgressSize) / 2); + } + } + + @Override + protected void onDraw(Canvas canvas) { + if (pinchToZoomHelper != null && pinchToZoomHelper.isInOverlayMode()) { + return; + } + if (radialProgress != null) { + final int realPosition = getRealPosition(position); + final Drawable drawable = getImageReceiver().getDrawable(); + boolean hideProgress; + if (realPosition < imagesUploadProgress.size() && imagesUploadProgress.get(realPosition) != null) { + hideProgress = imagesUploadProgress.get(realPosition) >= 1f; + } else { + hideProgress = drawable != null && (!isVideo || (drawable instanceof AnimatedFileDrawable && ((AnimatedFileDrawable) drawable).getDurationMs() > 0)); + } + if (hideProgress) { + if (radialProgressHideAnimator == null) { + long startDelay = 0; + if (radialProgress.getProgress() < 1f) { + radialProgress.setProgress(1f, true); + startDelay = 100; + } + radialProgressHideAnimatorStartValue = radialProgress.getOverrideAlpha(); + radialProgressHideAnimator = ValueAnimator.ofFloat(0f, 1f); + radialProgressHideAnimator.setStartDelay(startDelay); + radialProgressHideAnimator.setDuration((long) (radialProgressHideAnimatorStartValue * 250f)); + radialProgressHideAnimator.setInterpolator(CubicBezierInterpolator.DEFAULT); + radialProgressHideAnimator.addUpdateListener(anim -> radialProgress.setOverrideAlpha(AndroidUtilities.lerp(radialProgressHideAnimatorStartValue, 0f, anim.getAnimatedFraction()))); + radialProgressHideAnimator.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + radialProgress = null; + radialProgresses.delete(getRealPosition(position)); + } + }); + radialProgressHideAnimator.start(); + } + } else { + if (firstDrawTime < 0) { + firstDrawTime = System.currentTimeMillis(); + } else { + final long elapsedTime = System.currentTimeMillis() - firstDrawTime; + final long startDelay = isVideo ? 250 : 750; + final long duration = 250; + if (elapsedTime <= startDelay + duration) { + if (elapsedTime > startDelay) { + radialProgress.setOverrideAlpha(CubicBezierInterpolator.DEFAULT.getInterpolation((elapsedTime - startDelay) / (float) duration)); + } + } + } + if (invalidateWithParent) { + invalidate(); + } else { + postInvalidateOnAnimation(); + } + invalidate(); + } + if (roundTopRadius == 0 && roundBottomRadius == 0) { + canvas.drawRect(0, 0, getWidth(), getHeight(), placeholderPaint); + } else if (roundTopRadius == roundBottomRadius) { + rect.set(0, 0, getWidth(), getHeight()); + canvas.drawRoundRect(rect, roundTopRadius, roundTopRadius, placeholderPaint); + } else { + path.reset(); + rect.set(0, 0, getWidth(), getHeight()); + for (int i = 0; i < 4; i++) { + radii[i] = roundTopRadius; + radii[4 + i] = roundBottomRadius; + } + path.addRoundRect(rect, radii, Path.Direction.CW); + canvas.drawPath(path, placeholderPaint); + } + } + super.onDraw(canvas); + + if (radialProgress != null && radialProgress.getOverrideAlpha() > 0f) { + radialProgress.draw(canvas); + } + } + + @Override + public void invalidate() { + super.invalidate(); + if (invalidateWithParent) { + ProfileGalleryView.this.invalidate(); + } + } + } + + public void setPinchToZoomHelper(PinchToZoomHelper pinchToZoomHelper) { + this.pinchToZoomHelper = pinchToZoomHelper; + } + + public void setInvalidateWithParent(boolean invalidateWithParent) { + this.invalidateWithParent = invalidateWithParent; + } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/PullForegroundDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/PullForegroundDrawable.java index a79fa4293..72b695a1a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/PullForegroundDrawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/PullForegroundDrawable.java @@ -468,7 +468,7 @@ public class PullForegroundDrawable { } public void startOutAnimation() { - if (animateOut) { + if (animateOut || listView == null) { return; } if (outAnimator != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java index b3814a033..23657cdda 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java @@ -773,7 +773,7 @@ public class RecyclerListView extends RecyclerView { } protected void onChildPressed(View child, float x, float y, boolean pressed) { - if (disableHighlightState) { + if (disableHighlightState || child == null) { return; } child.setPressed(pressed); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTabStrip.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTabStrip.java index 9c3585cb2..cc2a12055 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTabStrip.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTabStrip.java @@ -284,7 +284,7 @@ public class ScrollSlidingTabStrip extends HorizontalScrollView { BackupImageView imageView = new BackupImageView(getContext()); imageView.setLayerNum(1); imageView.setRoundRadius(AndroidUtilities.dp(15)); - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); imageView.setAspectFit(true); tab.addView(imageView, LayoutHelper.createFrame(30, 30, Gravity.CENTER)); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java index 2baca1604..d2a65baad 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java @@ -1601,7 +1601,7 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi View view; switch (viewType) { case 0: { - view = new ShareDialogCell(context, darkTheme); + view = new ShareDialogCell(context, darkTheme ? ShareDialogCell.TYPE_CALL : ShareDialogCell.TYPE_SHARE); view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, AndroidUtilities.dp(100))); break; } @@ -1901,8 +1901,8 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi if (becomeEmpty) { topBeforeSwitch = getCurrentTop(); } - searchAdapterHelper.mergeResults(searchResult); searchResult = result; + searchAdapterHelper.mergeResults(searchResult); notifyDataSetChanged(); if (!isEmpty && !becomeEmpty && topBeforeSwitch > 0) { layoutManager.scrollToPositionWithOffset(0, -topBeforeSwitch); @@ -1995,7 +1995,7 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi View view; switch (viewType) { case 0: { - view = new ShareDialogCell(context, darkTheme); + view = new ShareDialogCell(context, darkTheme ? ShareDialogCell.TYPE_CALL : ShareDialogCell.TYPE_SHARE); view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, AndroidUtilities.dp(100))); break; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java index bea492f20..d0b28c3d2 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java @@ -485,8 +485,28 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter return null; } final RecyclerListView listView = mediaPages[0].listView; + int firstVisiblePosition = -1; + int lastVisiblePosition = -1; for (int a = 0, count = listView.getChildCount(); a < count; a++) { View view = listView.getChildAt(a); + int visibleHeight = mediaPages[0].listView.getMeasuredHeight(); + View parent = (View) getParent(); + if (parent != null) { + if (getY() + getMeasuredHeight() > parent.getMeasuredHeight()) { + visibleHeight -= getBottom() - parent.getMeasuredHeight(); + } + } + + if (view.getTop() >= visibleHeight) { + continue; + } + int adapterPosition = listView.getChildAdapterPosition(view); + if (adapterPosition < firstVisiblePosition || firstVisiblePosition == -1) { + firstVisiblePosition = adapterPosition; + } + if (adapterPosition > lastVisiblePosition || lastVisiblePosition == -1) { + lastVisiblePosition = adapterPosition; + } int[] coords = new int[2]; ImageReceiver imageReceiver = null; if (view instanceof SharedPhotoVideoCell) { @@ -564,6 +584,18 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter return object; } } + if (mediaPages[0].selectedType == 0 && firstVisiblePosition >= 0 && lastVisiblePosition >= 0) { + int position = photoVideoAdapter.getPositionForIndex(index); + + if (position <= firstVisiblePosition) { + mediaPages[0].layoutManager.scrollToPositionWithOffset(position, 0); + profileActivity.scrollToSharedMedia(); + } else if (position >= lastVisiblePosition && lastVisiblePosition >= 0) { + mediaPages[0].layoutManager.scrollToPositionWithOffset(position, 0, true); + profileActivity.scrollToSharedMedia(); + } + } + return null; } }; @@ -3487,6 +3519,10 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter mContext = context; } + public int getPositionForIndex(int i) { + return i / columnsCount; + } + @Override public int getItemCount() { if (sharedMediaData[0].messages.size() == 0 && !sharedMediaData[0].loading) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/UndoView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/UndoView.java index 845862e02..7c3ed9c4b 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/UndoView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/UndoView.java @@ -44,8 +44,11 @@ import org.telegram.messenger.MessagesController; import org.telegram.messenger.R; import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserObject; +import org.telegram.tgnet.ConnectionsManager; import org.telegram.tgnet.TLRPC; +import org.telegram.ui.ActionBar.BaseFragment; import org.telegram.ui.ActionBar.Theme; +import org.telegram.ui.PaymentFormActivity; @SuppressWarnings("FieldCanBeLocal") public class UndoView extends FrameLayout { @@ -59,6 +62,8 @@ public class UndoView extends FrameLayout { private LinearLayout undoButton; private int undoViewHeight; + private BaseFragment parentFragment; + private Object currentInfoObject; private int currentAccount = UserConfig.selectedAccount; @@ -149,6 +154,8 @@ public class UndoView extends FrameLayout { public final static int ACTION_GIGAGROUP_CANCEL = 75; public final static int ACTION_GIGAGROUP_SUCCESS = 76; + public final static int ACTION_PAYMENT_SUCCESS = 77; + private CharSequence infoText; public class LinkMovementMethodMy extends LinkMovementMethod { @@ -175,11 +182,16 @@ public class UndoView extends FrameLayout { } public UndoView(Context context) { - this(context, false); + this(context, null, false); } - public UndoView(Context context, boolean top) { + public UndoView(Context context, BaseFragment parent) { + this(context, parent, false); + } + + public UndoView(Context context, BaseFragment parent, boolean top) { super(context); + parentFragment = parent; fromTop = top; infoTextView = new TextView(context); @@ -280,7 +292,7 @@ public class UndoView extends FrameLayout { currentAction == ACTION_CHAT_UNARCHIVED || currentAction == ACTION_VOIP_MUTED || currentAction == ACTION_VOIP_UNMUTED || currentAction == ACTION_VOIP_REMOVED || currentAction == ACTION_VOIP_LINK_COPIED || currentAction == ACTION_VOIP_INVITED || currentAction == ACTION_VOIP_MUTED_FOR_YOU || currentAction == ACTION_VOIP_UNMUTED_FOR_YOU || currentAction == ACTION_REPORT_SENT || currentAction == ACTION_VOIP_USER_CHANGED || currentAction == ACTION_VOIP_CAN_NOW_SPEAK || currentAction == ACTION_VOIP_RECORDING_STARTED || - currentAction == ACTION_VOIP_RECORDING_FINISHED || currentAction == ACTION_VOIP_SOUND_MUTED || currentAction == ACTION_VOIP_SOUND_UNMUTED; + currentAction == ACTION_VOIP_RECORDING_FINISHED || currentAction == ACTION_VOIP_SOUND_MUTED || currentAction == ACTION_VOIP_SOUND_UNMUTED || currentAction == ACTION_PAYMENT_SUCCESS; } private boolean hasSubInfo() { @@ -412,6 +424,9 @@ public class UndoView extends FrameLayout { boolean infoOnly = false; boolean reversedPlay = false; int reversedPlayEndFrame = 0; + setOnClickListener(null); + setOnTouchListener((v, event) -> true); + infoTextView.setMovementMethod(new LinkMovementMethodMy()); if (isTooltipAction()) { CharSequence infoText; @@ -434,7 +449,7 @@ public class UndoView extends FrameLayout { AvatarDrawable avatarDrawable = new AvatarDrawable(); avatarDrawable.setTextSize(AndroidUtilities.dp(12)); avatarDrawable.setInfo(user); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); avatarImageView.setVisibility(VISIBLE); timeLeft = 3000; } else if (action == ACTION_VOIP_USER_CHANGED) { @@ -444,12 +459,12 @@ public class UndoView extends FrameLayout { if (infoObject instanceof TLRPC.User) { TLRPC.User user = (TLRPC.User) infoObject; avatarDrawable.setInfo(user); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); name = ContactsController.formatName(user.first_name, user.last_name); } else { TLRPC.Chat chat = (TLRPC.Chat) infoObject; avatarDrawable.setInfo(chat); - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); name = chat.title; } infoText = AndroidUtilities.replaceTags(LocaleController.formatString("VoipGroupUserChanged", R.string.VoipGroupUserChanged, name)); @@ -462,6 +477,27 @@ public class UndoView extends FrameLayout { subInfoText = null; icon = R.raw.voip_invite; timeLeft = 3000; + } else if (action == ACTION_PAYMENT_SUCCESS) { + infoText = (CharSequence) infoObject; + subInfoText = null; + icon = R.raw.payment_success; + timeLeft = 5000; + if (parentFragment != null && infoObject2 instanceof TLRPC.Message) { + TLRPC.Message message = (TLRPC.Message) infoObject2; + setOnTouchListener(null); + infoTextView.setMovementMethod(null); + setOnClickListener(v -> { + hide(true, 1); + TLRPC.TL_payments_getPaymentReceipt req = new TLRPC.TL_payments_getPaymentReceipt(); + req.msg_id = message.id; + req.peer = parentFragment.getMessagesController().getInputPeer(message.peer_id); + parentFragment.getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> { + if (response instanceof TLRPC.TL_payments_paymentReceipt) { + parentFragment.presentFragment(new PaymentFormActivity((TLRPC.TL_payments_paymentReceipt) response)); + } + }), ConnectionsManager.RequestFlagFailOnServerErrors); + }); + } } else if (action == ACTION_VOIP_MUTED) { String name; if (infoObject instanceof TLRPC.User) { @@ -670,7 +706,7 @@ public class UndoView extends FrameLayout { } } subInfoText = null; - icon = R.raw.contact_check; + icon = action == ACTION_ADDED_TO_FOLDER ? R.raw.folder_in : R.raw.folder_out; } else if (action == ACTION_CACHE_WAS_CLEARED) { infoText = this.infoText; subInfoText = null; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoForwardDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoForwardDrawable.java index 4b9539dd8..4dbc78593 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoForwardDrawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoForwardDrawable.java @@ -21,13 +21,25 @@ public class VideoForwardDrawable extends Drawable { private final static int[] playPath = new int[] {10, 7, 26, 16, 10, 25}; private float animationProgress; + private float enterAnimationProgress; private boolean animating; + private boolean isOneShootAnimation; + private boolean showing; private long lastAnimationTime; private VideoForwardDrawableDelegate delegate; - long time; - String timeStr; + private long time; + private String timeStr; + + public void setTime(long dt) { + time = dt; + if (time >= 1000) { + timeStr = LocaleController.formatPluralString("Seconds", (int) (time / 1000)); + } else { + timeStr = null; + } + } public interface VideoForwardDrawableDelegate { void onAnimationEnd(); @@ -61,8 +73,17 @@ public class VideoForwardDrawable extends Drawable { invalidateSelf(); } + public void setOneShootAnimation(boolean isOneShootAnimation) { + if (this.isOneShootAnimation != isOneShootAnimation) { + this.isOneShootAnimation = isOneShootAnimation; + timeStr = null; + time = 0; + animationProgress = 0f; + } + } + public void setLeftSide(boolean value) { - if (leftSide == value && animationProgress >= 1.0f) { + if (leftSide == value && animationProgress >= 1.0f && isOneShootAnimation) { return; } if (leftSide != value) { @@ -111,12 +132,17 @@ public class VideoForwardDrawable extends Drawable { canvas.save(); canvas.clipRect(rect.left, rect.top, rect.right, rect.bottom); - if (animationProgress <= 0.7f) { - paint.setAlpha((int) (80 * Math.min(1.0f, animationProgress / 0.3f))); - textPaint.setAlpha((int) (255 * Math.min(1.0f, animationProgress / 0.3f))); + if (!isOneShootAnimation) { + paint.setAlpha((int) (80 * enterAnimationProgress)); + textPaint.setAlpha((int) (255 * enterAnimationProgress)); } else { - paint.setAlpha((int) (80 * (1.0f - (animationProgress - 0.7f) / 0.3f))); - textPaint.setAlpha((int) (255 * (1.0f - (animationProgress - 0.7f) / 0.3f))); + if (animationProgress <= 0.7f) { + paint.setAlpha((int) (80 * Math.min(1.0f, animationProgress / 0.3f))); + textPaint.setAlpha((int) (255 * Math.min(1.0f, animationProgress / 0.3f))); + } else { + paint.setAlpha((int) (80 * (1.0f - (animationProgress - 0.7f) / 0.3f))); + textPaint.setAlpha((int) (255 * (1.0f - (animationProgress - 0.7f) / 0.3f))); + } } canvas.drawCircle(x + Math.max(rect.width(), rect.height()) / 4 * (leftSide ? -1 : 1), y + AndroidUtilities.dp(16), Math.max(rect.width(), rect.height()) / 2, paint); canvas.restore(); @@ -131,31 +157,46 @@ public class VideoForwardDrawable extends Drawable { } canvas.translate(x, y); if (animationProgress <= 0.6f) { + int a; if (animationProgress < 0.4f) { - paint.setAlpha(Math.min(255, (int) (255 * animationProgress / 0.2f))); + a = Math.min(255, (int) (255 * animationProgress / 0.2f)); } else { - paint.setAlpha((int) (255 * (1.0f - (animationProgress - 0.4f) / 0.2f))); + a = (int) (255 * (1.0f - (animationProgress - 0.4f) / 0.2f)); } + if (!isOneShootAnimation) { + a = (int) (a * enterAnimationProgress); + } + paint.setAlpha(a); canvas.drawPath(path1, paint); } canvas.translate(AndroidUtilities.dp(18), 0); if (animationProgress >= 0.2f && animationProgress <= 0.8f) { float progress = animationProgress - 0.2f; + int a; if (progress < 0.4f) { - paint.setAlpha(Math.min(255, (int) (255 * progress / 0.2f))); + a = Math.min(255, (int) (255 * progress / 0.2f)); } else { - paint.setAlpha((int) (255 * (1.0f - (progress - 0.4f) / 0.2f))); + a = (int) (255 * (1.0f - (progress - 0.4f) / 0.2f)); } + if (!isOneShootAnimation) { + a = (int) (a * enterAnimationProgress); + } + paint.setAlpha(a); canvas.drawPath(path1, paint); } canvas.translate(AndroidUtilities.dp(18), 0); if (animationProgress >= 0.4f && animationProgress <= 1.0f) { float progress = animationProgress - 0.4f; + int a; if (progress < 0.4f) { - paint.setAlpha(Math.min(255, (int) (255 * progress / 0.2f))); + a = Math.min(255, (int) (255 * progress / 0.2f)); } else { - paint.setAlpha((int) (255 * (1.0f - (progress - 0.4f) / 0.2f))); + a = (int) (255 * (1.0f - (progress - 0.4f) / 0.2f)); } + if (!isOneShootAnimation) { + a = (int) (a * enterAnimationProgress); + } + paint.setAlpha(a); canvas.drawPath(path1, paint); } canvas.restore(); @@ -169,24 +210,57 @@ public class VideoForwardDrawable extends Drawable { lastAnimationTime = newTime; if (animationProgress < 1.0f) { animationProgress += dt / 800.0f; - if (animationProgress >= 1.0f) { - animationProgress = 0.0f; - animating = false; - time = 0; - timeStr = null; - if (delegate != null) { - delegate.onAnimationEnd(); + if (!isOneShootAnimation) { + if (animationProgress >= 1.0f) { + if (showing) { + animationProgress = 0f; + } else { + animationProgress = 1f; + } + } + } else { + if (animationProgress >= 1.0f) { + animationProgress = 0.0f; + animating = false; + time = 0; + timeStr = null; + if (delegate != null) { + delegate.onAnimationEnd(); + } } } - if (delegate != null) { - delegate.invalidate(); - } else { - invalidateSelf(); + invalidate(); + } + if (!isOneShootAnimation) { + if (showing && enterAnimationProgress != 1f) { + enterAnimationProgress += 16 / 150f; + invalidate(); + } else if (!showing && enterAnimationProgress != 0) { + enterAnimationProgress -= 16 / 150f; + invalidate(); + } + if (enterAnimationProgress < 0) { + enterAnimationProgress = 0f; + } else if (enterAnimationProgress > 1f) { + enterAnimationProgress = 1f; } } } } + public void setShowing(boolean showing) { + this.showing = showing; + invalidate(); + } + + private void invalidate() { + if (delegate != null) { + delegate.invalidate(); + } else { + invalidateSelf(); + } + } + @Override public int getIntrinsicWidth() { return AndroidUtilities.dp(32); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoPlayerSeekBar.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoPlayerSeekBar.java index 67fd64bb6..6f893a021 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoPlayerSeekBar.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/VideoPlayerSeekBar.java @@ -11,6 +11,7 @@ package org.telegram.ui.Components; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; +import android.graphics.Path; import android.graphics.RectF; import android.os.SystemClock; import android.view.MotionEvent; @@ -18,6 +19,8 @@ import android.view.View; import androidx.core.graphics.ColorUtils; +import com.google.android.exoplayer2.util.Log; + import org.telegram.messenger.AndroidUtilities; public class VideoPlayerSeekBar { @@ -45,6 +48,9 @@ public class VideoPlayerSeekBar { private int backgroundSelectedColor; private RectF rect = new RectF(); private boolean selected; + private float animateFromBufferedProgress; + private boolean animateResetBuffering; + private float bufferedAnimationValue = 1f; private float bufferedProgress; private float currentRadius; private long lastUpdateTime; @@ -133,11 +139,20 @@ public class VideoPlayerSeekBar { } public void setProgress(float progress, boolean animated) { + int newThumb = (int) Math.ceil((width - thumbWidth) * progress); + if (animated) { - animateThumbProgress = 0; - fromThumbX = thumbX; + if (Math.abs(newThumb - thumbX) > AndroidUtilities.dp(10)) { + float progressInterpolated = CubicBezierInterpolator.DEFAULT.getInterpolation(animateThumbProgress); + fromThumbX = (int) (thumbX * progressInterpolated + fromThumbX * (1f - progressInterpolated)); + animateThumbProgress = 0; + } else if (animateThumbProgress == 1f) { + animateThumbProgress = 0; + fromThumbX = thumbX; + } } - thumbX = (int) Math.ceil((width - thumbWidth) * progress); + thumbX = newThumb; + if (thumbX < 0) { thumbX = 0; } else if (thumbX > width - thumbWidth) { @@ -150,7 +165,12 @@ public class VideoPlayerSeekBar { } public void setBufferedProgress(float value) { - bufferedProgress = value; + if (value != bufferedProgress) { + animateFromBufferedProgress = bufferedProgress; + animateResetBuffering = value < bufferedProgress; + bufferedProgress = value; + bufferedAnimationValue = 0; + } } public float getProgress() { @@ -206,7 +226,7 @@ public class VideoPlayerSeekBar { float currentThumbX = thumbX; if (animateThumbProgress != 1f) { - animateThumbProgress += 16 / 150f; + animateThumbProgress += 16 / 220f; if (animateThumbProgress >= 1f) { animateThumbProgress = 1f; } else { @@ -220,11 +240,34 @@ public class VideoPlayerSeekBar { setPaintColor(selected ? backgroundSelectedColor : backgroundColor, 1f - transitionProgress); canvas.drawRoundRect(rect, radius, radius, paint); + if (bufferedAnimationValue != 1f) { + bufferedAnimationValue += 16 / 100f; + if (bufferedAnimationValue > 1) { + bufferedAnimationValue = 1f; + } else { + parentView.invalidate(); + } + } + // buffered - if (bufferedProgress > 0) { - rect.right = horizontalPadding + AndroidUtilities.lerp(thumbWidth / 2f + bufferedProgress * (width - thumbWidth), parentView.getWidth() - horizontalPadding * 2f, transitionProgress); - setPaintColor(selected ? backgroundSelectedColor : cacheColor, 1f - transitionProgress); - canvas.drawRoundRect(rect, radius, radius, paint); + if (animateResetBuffering) { + if (animateFromBufferedProgress > 0) { + rect.right = horizontalPadding + AndroidUtilities.lerp(thumbWidth / 2f + animateFromBufferedProgress * (width - thumbWidth), parentView.getWidth() - horizontalPadding * 2f, transitionProgress); + setPaintColor(selected ? backgroundSelectedColor : cacheColor, (1f - transitionProgress) * (1f - bufferedAnimationValue)); + canvas.drawRoundRect(rect, radius, radius, paint); + } + if (bufferedProgress > 0) { + rect.right = horizontalPadding + AndroidUtilities.lerp(thumbWidth / 2f + bufferedProgress * (width - thumbWidth), parentView.getWidth() - horizontalPadding * 2f, transitionProgress); + setPaintColor(selected ? backgroundSelectedColor : cacheColor, 1f - transitionProgress); + canvas.drawRoundRect(rect, radius, radius, paint); + } + } else { + float currentBufferedProgress = animateFromBufferedProgress * (1f - bufferedAnimationValue) + bufferedProgress * bufferedAnimationValue; + if (currentBufferedProgress > 0) { + rect.right = horizontalPadding + AndroidUtilities.lerp(thumbWidth / 2f + currentBufferedProgress * (width - thumbWidth), parentView.getWidth() - horizontalPadding * 2f, transitionProgress); + setPaintColor(selected ? backgroundSelectedColor : cacheColor, 1f - transitionProgress); + canvas.drawRoundRect(rect, radius, radius, paint); + } } // progress diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPHelper.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPHelper.java index 9396b7ba5..bdab37c21 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPHelper.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPHelper.java @@ -217,7 +217,7 @@ public class VoIPHelper { if (!TextUtils.isEmpty(hash)) { voIPService.setGroupCallHash(hash); } - GroupCallActivity.create((LaunchActivity) activity, AccountInstance.getInstance(UserConfig.selectedAccount)); + GroupCallActivity.create((LaunchActivity) activity, AccountInstance.getInstance(UserConfig.selectedAccount), null, null, false, null); } } } else if (VoIPService.callIShouldHavePutIntoIntent == null) { @@ -256,8 +256,10 @@ public class VoIPHelper { } } if (checkJoiner && chat != null) { - JoinCallAlert.open(activity, -chat.id, accountInstance, fragment, createCall ? JoinCallAlert.TYPE_CREATE : JoinCallAlert.TYPE_JOIN, (selectedPeer, hasFew) -> { - if (!hasFew && hash != null) { + JoinCallAlert.open(activity, -chat.id, accountInstance, fragment, createCall ? JoinCallAlert.TYPE_CREATE : JoinCallAlert.TYPE_JOIN, null, (selectedPeer, hasFew, schedule) -> { + if (createCall && schedule) { + GroupCallActivity.create((LaunchActivity) activity, accountInstance, chat, selectedPeer, hasFew, hash); + } else if (!hasFew && hash != null) { JoinCallByUrlAlert alert = new JoinCallByUrlAlert(activity, chat) { @Override protected void onJoin() { @@ -302,6 +304,13 @@ public class VoIPHelper { } } } + if (chat != null && !createCall) { + ChatObject.Call call = accountInstance.getMessagesController().getGroupCall(chat.id, false); + if (call != null && call.isScheduled()) { + GroupCallActivity.create((LaunchActivity) activity, accountInstance, chat, peer, hasFewPeers, hash); + return; + } + } lastCallTime = SystemClock.elapsedRealtime(); Intent intent = new Intent(activity, VoIPService.class); @@ -715,7 +724,7 @@ public class VoIPHelper { return; } JoinCallAlert.checkFewUsers(fragment.getParentActivity(), -currentChat.id, accountInstance, param -> { - if (param) { + /*if (param) { if (fragment.getParentActivity() == null) { return; } @@ -740,9 +749,9 @@ public class VoIPHelper { }); builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); fragment.showDialog(builder.create()); - } else { + } else {*/ startCall(currentChat, peer, null, true, fragment.getParentActivity(), fragment, accountInstance); - } + //} }); } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPToggleButton.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPToggleButton.java index 9c68940ec..6d3a9b6dd 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPToggleButton.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/voip/VoIPToggleButton.java @@ -5,7 +5,6 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.SuppressLint; import android.content.Context; -import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; @@ -27,6 +26,7 @@ import androidx.core.content.ContextCompat; import androidx.core.graphics.ColorUtils; import org.telegram.messenger.AndroidUtilities; +import org.telegram.messenger.FileLog; import org.telegram.ui.ActionBar.Theme; import org.telegram.ui.Components.CubicBezierInterpolator; import org.telegram.ui.Components.LayoutHelper; @@ -35,6 +35,7 @@ public class VoIPToggleButton extends FrameLayout { Paint circlePaint = new Paint(Paint.ANTI_ALIAS_FLAG); private boolean drawBackground = true; + private boolean animateBackground; Drawable[] icon = new Drawable[2]; TextView[] textView = new TextView[2]; @@ -116,7 +117,7 @@ public class VoIPToggleButton extends FrameLayout { @SuppressLint("DrawAllocation") @Override protected void onDraw(Canvas canvas) { - if (replaceProgress != 0) { + if (animateBackground && replaceProgress != 0) { circlePaint.setColor(ColorUtils.blendARGB(backgroundColor, animateToBackgroundColor, replaceProgress)); } else { circlePaint.setColor(backgroundColor); @@ -231,6 +232,16 @@ public class VoIPToggleButton extends FrameLayout { setData(iconRes, iconColor, backgroundColor, 1.0f, true, text, cross, animated); } + public void setEnabled(boolean enabled, boolean animated) { + super.setEnabled(enabled); + if (animated) { + animate().alpha(enabled ? 1.0f : 0.5f).setDuration(180).start(); + } else { + clearAnimation(); + setAlpha(enabled ? 1.0f : 0.5f); + } + } + public void setData(int iconRes, int iconColor, int backgroundColor, float selectorAlpha, boolean recreateRipple, String text, boolean cross, boolean animated) { if (getVisibility() != View.VISIBLE) { animated = false; @@ -254,6 +265,7 @@ public class VoIPToggleButton extends FrameLayout { if (replaceAnimator != null) { replaceAnimator.cancel(); } + animateBackground = currentBackgroundColor != backgroundColor; iconChangeColor = currentIconRes == iconRes; if (iconChangeColor) { @@ -372,8 +384,11 @@ public class VoIPToggleButton extends FrameLayout { this.checkable = checkable; } - public void setChecked(boolean checked, boolean animated) { - this.checked = checked; + public void setChecked(boolean value, boolean animated) { + if (checked == value) { + return; + } + checked = value; if (checkable) { if (animated) { if (checkAnimator != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ContactAddActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ContactAddActivity.java index 45dcaab08..cfcbc8b14 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ContactAddActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ContactAddActivity.java @@ -277,7 +277,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent } } onlineTextView.setText(LocaleController.formatUserStatus(currentAccount, user)); - avatarImage.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable = new AvatarDrawable(user), user); + avatarImage.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable = new AvatarDrawable(user), user); } public void didReceivedNotification(int id, int account, Object... args) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java index 895d8db23..a270276fe 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java @@ -73,6 +73,8 @@ import androidx.recyclerview.widget.LinearSmoothScrollerCustom; import androidx.recyclerview.widget.RecyclerView; import androidx.viewpager.widget.ViewPager; +import com.google.android.exoplayer2.util.Log; + import org.telegram.messenger.AccountInstance; import org.telegram.messenger.AndroidUtilities; import org.telegram.messenger.ApplicationLoader; @@ -249,6 +251,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. private int messagesCount; private int hasPoll; + private boolean hasInvoice; private PacmanAnimation pacmanAnimation; @@ -524,6 +527,19 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. if (child == viewPages[0] || (viewPages.length > 1 && child == viewPages[1]) || child == fragmentContextView || child == fragmentLocationContextView || child == searchViewPager) { canvas.save(); canvas.clipRect(0, -getY() + actionBar.getY() + getActionBarFullHeight(), getMeasuredWidth(), getMeasuredHeight()); + if (slideFragmentProgress != 1f) { + float s = 1f - 0.05f * (1f - slideFragmentProgress); + canvas.translate((isDrawerTransition ? AndroidUtilities.dp(4) : -AndroidUtilities.dp(4)) * (1f - slideFragmentProgress), 0); + canvas.scale(s, s, isDrawerTransition ? getMeasuredWidth() : 0, -getY() + actionBar.getY() + getActionBarFullHeight()); + } + + result = super.drawChild(canvas, child, drawingTime); + canvas.restore(); + } else if (child == actionBar && slideFragmentProgress != 1f) { + canvas.save(); + float s = 1f - 0.05f * (1f - slideFragmentProgress); + canvas.translate((isDrawerTransition ? AndroidUtilities.dp(4) : -AndroidUtilities.dp(4)) * (1f - slideFragmentProgress), 0); + canvas.scale(s, s, isDrawerTransition ? getMeasuredWidth() : 0, (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + ActionBar.getCurrentActionBarHeight() / 2f); result = super.drawChild(canvas, child, drawingTime); canvas.restore(); } else { @@ -633,6 +649,11 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. if (fragmentContextView != null && fragmentContextView.isCallStyle()) { canvas.save(); canvas.translate(fragmentContextView.getX(), fragmentContextView.getY()); + if (slideFragmentProgress != 1f) { + float s = 1f - 0.05f * (1f - slideFragmentProgress); + canvas.translate((isDrawerTransition ? AndroidUtilities.dp(4) : -AndroidUtilities.dp(4)) * (1f - slideFragmentProgress), 0); + canvas.scale(s, 1f, isDrawerTransition ? getMeasuredWidth() : 0, fragmentContextView.getY()); + } fragmentContextView.setDrawOverlay(true); fragmentContextView.draw(canvas); fragmentContextView.setDrawOverlay(false); @@ -729,6 +750,9 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. } else { child.setTranslationY(0); } + int transitionPadding = (isSlideBackTransition || isDrawerTransition) ? (int) (h * 0.05f) : 0; + h += transitionPadding; + child.setPadding(child.getPaddingLeft(), child.getPaddingTop(), child.getPaddingRight(), transitionPadding); child.measure(contentWidthSpec, View.MeasureSpec.makeMeasureSpec(Math.max(AndroidUtilities.dp(10), h), View.MeasureSpec.EXACTLY)); child.setPivotX(child.getMeasuredWidth() / 2); } else if (child == searchViewPager) { @@ -867,7 +891,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. @Override public boolean onTouchEvent(MotionEvent ev) { - if (filterTabsView != null && !filterTabsView.isEditing() && !searching && + if (parentLayout != null && filterTabsView != null && !filterTabsView.isEditing() && !searching && !parentLayout.checkTransitionAnimation() && !parentLayout.isInPreviewMode() && !parentLayout.isPreviewOpenAnimationInProgress() && !parentLayout.getDrawerLayoutContainer().isDrawerOpened() && (ev == null || startedTracking || ev.getY() > actionBar.getMeasuredHeight() + actionBar.getTranslationY()) && SharedConfig.getChatSwipeAction(currentAccount) == SwipeGestureSettingsView.SWIPE_GESTURE_FOLDERS) { if (ev != null) { @@ -1087,7 +1111,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. private boolean firstLayout = true; private boolean ignoreLayout; - private ViewPage parentPage; + private final ViewPage parentPage; private int appliedPaddingTop; private int lastTop; private int lastListPadding; @@ -1202,7 +1226,9 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); - parentPage.recyclerItemsEnterAnimator.onDetached(); + if (parentPage != null && parentPage.recyclerItemsEnterAnimator != null) { + parentPage.recyclerItemsEnterAnimator.onDetached(); + } } @Override @@ -1750,6 +1776,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. resetDelegate = arguments.getBoolean("resetDelegate", true); messagesCount = arguments.getInt("messagesCount", 0); hasPoll = arguments.getInt("hasPoll", 0); + hasInvoice = arguments.getBoolean("hasInvoice", false); } if (initialDialogsType == 0) { @@ -1808,6 +1835,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. messagesController.loadUserInfo(accountInstance.getUserConfig().getCurrentUser(), false, 0); accountInstance.getContactsController().checkInviteText(); accountInstance.getMediaDataController().loadRecents(MediaDataController.TYPE_FAVE, false, true, false); + accountInstance.getMediaDataController().loadRecents(MediaDataController.TYPE_GREETINGS, false, true, false); accountInstance.getMediaDataController().checkFeaturedStickers(); for (String emoji : messagesController.diceEmojies) { accountInstance.getMediaDataController().loadStickersByEmojiOrName(emoji, true, true); @@ -2423,7 +2451,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. TLRPC.User user = getUserConfig().getCurrentUser(); avatarDrawable.setInfo(user); imageView.getImageReceiver().setCurrentAccount(currentAccount); - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); for (int a = 0; a < UserConfig.MAX_ACCOUNT_COUNT; a++) { TLRPC.User u = AccountInstance.getInstance(a).getUserConfig().getCurrentUser(); @@ -4661,7 +4689,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. if (getMessagesController().checkCanOpenChat(args, DialogsActivity.this)) { ChatActivity chatActivity = new ChatActivity(args); if (adapter instanceof DialogsAdapter && lower_part > 0 && (getMessagesController().dialogs_dict.get(dialogId) == null)) { - TLRPC.Document sticker = getMessagesController().getPreloadedSticker(); + TLRPC.Document sticker = getMediaDataController().getGreetingsSticker(); if (sticker != null) { chatActivity.setPreloadedSticker(sticker, true); } @@ -5504,6 +5532,10 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. private void scrollToTop() { int scrollDistance = viewPages[0].layoutManager.findFirstVisibleItemPosition() * AndroidUtilities.dp(SharedConfig.useThreeLinesLayout ? 78 : 72); int position = viewPages[0].dialogsType == 0 && hasHiddenArchive() ? 1 : 0; + RecyclerView.ItemAnimator animator = viewPages[0].listView.getItemAnimator(); +// if (animator != null) { +// animator.endAnimations(); +// } if (scrollDistance >= viewPages[0].listView.getMeasuredHeight() * 1.2f) { viewPages[0].scrollHelper.setScrollDirection(RecyclerAnimationScrollHelper.SCROLL_DIRECTION_UP); viewPages[0].scrollHelper.scrollToPosition(position, 0, false, true); @@ -6560,10 +6592,14 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. showDialog(builder.create()); return; } - } else if (lowerId == 0 && hasPoll != 0) { + } else if (lowerId == 0 && (hasPoll != 0 || hasInvoice)) { AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); builder.setTitle(LocaleController.getString("SendMessageTitle", R.string.SendMessageTitle)); - builder.setMessage(LocaleController.getString("PollCantForwardSecretChat", R.string.PollCantForwardSecretChat)); + if (hasPoll != 0) { + builder.setMessage(LocaleController.getString("PollCantForwardSecretChat", R.string.PollCantForwardSecretChat)); + } else { + builder.setMessage(LocaleController.getString("InvoiceCantForwardSecretChat", R.string.InvoiceCantForwardSecretChat)); + } builder.setNegativeButton(LocaleController.getString("OK", R.string.OK), null); showDialog(builder.create()); return; @@ -7199,4 +7235,138 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. return arrayList; } + + float slideFragmentProgress = 1f; + boolean isSlideBackTransition; + boolean isDrawerTransition; + ValueAnimator slideBackTransitionAnimator; + + @Override + protected Animator getCustomSlideTransition(boolean topFragment, boolean backAnimation, float distanceToMove) { + if (backAnimation) { + slideBackTransitionAnimator = ValueAnimator.ofFloat(slideFragmentProgress, 1f); + return slideBackTransitionAnimator; + } + int duration = (int) (Math.max((int) (200.0f / getLayoutContainer().getMeasuredWidth() * distanceToMove), 80) * 1.2f); + slideBackTransitionAnimator = ValueAnimator.ofFloat(slideFragmentProgress, 1f); + slideBackTransitionAnimator.addUpdateListener(valueAnimator -> setSlideTransitionProgress((float) valueAnimator.getAnimatedValue())); + slideBackTransitionAnimator.setInterpolator(CubicBezierInterpolator.EASE_OUT); + slideBackTransitionAnimator.setDuration(duration); + slideBackTransitionAnimator.start(); + return slideBackTransitionAnimator; + } + + @Override + protected void prepareFragmentToSlide(boolean topFragment, boolean beginSlide) { + if (!topFragment && beginSlide) { + isSlideBackTransition = true; + setFragmentIsSliding(true); + } else { + slideBackTransitionAnimator = null; + isSlideBackTransition = false; + setFragmentIsSliding(false); + setSlideTransitionProgress(1f); + } + } + + private void setFragmentIsSliding(boolean sliding) { + if (SharedConfig.getDevicePerformanceClass() == SharedConfig.PERFORMANCE_CLASS_LOW) { + return; + } + if (sliding) { + if (viewPages != null && viewPages[0] != null) { + viewPages[0].setLayerType(View.LAYER_TYPE_HARDWARE, null); + viewPages[0].setClipChildren(false); + viewPages[0].setClipToPadding(false); + viewPages[0].listView.setClipChildren(false); + } + + if (actionBar != null) { + actionBar.setLayerType(View.LAYER_TYPE_HARDWARE, null); + } + if (filterTabsView != null) { + filterTabsView.getListView().setLayerType(View.LAYER_TYPE_HARDWARE, null); + } + if (fragmentView != null) { + ((ViewGroup) fragmentView).setClipChildren(false); + fragmentView.requestLayout(); + } + } else { + + for (int i = 0; i < viewPages.length; i++) { + ViewPage page = viewPages[i]; + if (page != null) { + page.setLayerType(View.LAYER_TYPE_NONE, null); + page.setClipChildren(true); + page.setClipToPadding(true); + page.listView.setClipChildren(true); + } + } + + if (actionBar != null) { + actionBar.setLayerType(View.LAYER_TYPE_NONE, null); + } + + if (filterTabsView != null) { + filterTabsView.getListView().setLayerType(View.LAYER_TYPE_NONE, null); + } + if (fragmentView != null) { + ((ViewGroup) fragmentView).setClipChildren(true); + fragmentView.requestLayout(); + } + } + } + + @Override + protected void onSlideProgress(boolean isOpen, float progress) { + if (SharedConfig.getDevicePerformanceClass() == SharedConfig.PERFORMANCE_CLASS_LOW) { + return; + } + if (isSlideBackTransition && slideBackTransitionAnimator == null) { + setSlideTransitionProgress(progress); + } + } + + private void setSlideTransitionProgress(float progress) { + if (SharedConfig.getDevicePerformanceClass() == SharedConfig.PERFORMANCE_CLASS_LOW) { + return; + } + slideFragmentProgress = progress; + if (fragmentView != null) { + fragmentView.invalidate(); + } + + if (filterTabsView != null) { + float s = 1f - 0.05f * (1f - slideFragmentProgress); + filterTabsView.getListView().setScaleX(s); + filterTabsView.getListView().setScaleY(s); + filterTabsView.getListView().setTranslationX((isDrawerTransition ? AndroidUtilities.dp(4) : -AndroidUtilities.dp(4)) * (1f - slideFragmentProgress)); + filterTabsView.getListView().setPivotX(isDrawerTransition ? filterTabsView.getMeasuredWidth() : 0); + filterTabsView.getListView().setPivotY(0); + filterTabsView.invalidate(); + } + } + + @Override + public void setProgressToDrawerOpened(float progress) { + if (SharedConfig.getDevicePerformanceClass() == SharedConfig.PERFORMANCE_CLASS_LOW) { + return; + } + boolean drawerTransition = progress > 0; + if (searchIsShowed) { + drawerTransition = false; + progress = 0; + } + if (drawerTransition != isDrawerTransition) { + isDrawerTransition = drawerTransition; + if (isDrawerTransition) { + setFragmentIsSliding(true); + } else { + setFragmentIsSliding(false); + } + fragmentView.requestLayout(); + } + setSlideTransitionProgress(1f - progress); + } } + diff --git a/TMessagesProj/src/main/java/org/telegram/ui/GroupCallActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/GroupCallActivity.java index b3fea4957..2bc2c8943 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/GroupCallActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/GroupCallActivity.java @@ -8,6 +8,8 @@ import android.animation.ValueAnimator; import android.annotation.SuppressLint; import android.content.Context; import android.content.DialogInterface; +import android.content.Intent; +import android.content.SharedPreferences; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; @@ -67,7 +69,9 @@ import androidx.viewpager.widget.ViewPager; import org.telegram.messenger.AccountInstance; import org.telegram.messenger.AndroidUtilities; import org.telegram.messenger.ChatObject; +import org.telegram.messenger.FileLoader; import org.telegram.messenger.FileLog; +import org.telegram.messenger.ImageLoader; import org.telegram.messenger.ImageLocation; import org.telegram.messenger.LocaleController; import org.telegram.messenger.MessageObject; @@ -78,6 +82,7 @@ import org.telegram.messenger.UserObject; import org.telegram.messenger.Utilities; import org.telegram.messenger.voip.VoIPBaseService; import org.telegram.messenger.voip.VoIPService; +import org.telegram.tgnet.ConnectionsManager; import org.telegram.tgnet.TLObject; import org.telegram.tgnet.TLRPC; import org.telegram.ui.ActionBar.ActionBar; @@ -108,8 +113,10 @@ import org.telegram.ui.Components.FillLastLinearLayoutManager; import org.telegram.ui.Components.GroupCallPip; import org.telegram.ui.Components.GroupVoipInviteAlert; import org.telegram.ui.Components.HintView; +import org.telegram.ui.Components.ImageUpdater; import org.telegram.ui.Components.JoinCallAlert; import org.telegram.ui.Components.LayoutHelper; +import org.telegram.ui.Components.NumberPicker; import org.telegram.ui.Components.ProfileGalleryView; import org.telegram.ui.Components.RLottieDrawable; import org.telegram.ui.Components.RLottieImageView; @@ -120,7 +127,9 @@ import org.telegram.ui.Components.UndoView; import org.telegram.ui.Components.WaveDrawable; import org.telegram.ui.Components.voip.VoIPToggleButton; +import java.io.File; import java.util.ArrayList; +import java.util.Calendar; import java.util.Locale; public class GroupCallActivity extends BottomSheet implements NotificationCenter.NotificationCenterDelegate, VoIPBaseService.StateListener { @@ -140,6 +149,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter private static final int MUTE_BUTTON_STATE_MUTED_BY_ADMIN = 2; private static final int MUTE_BUTTON_STATE_CONNECTING = 3; private static final int MUTE_BUTTON_STATE_RAISED_HAND = 4; + private static final int MUTE_BUTTON_STATE_START_NOW = 5; + private static final int MUTE_BUTTON_STATE_SET_REMINDER = 6; + private static final int MUTE_BUTTON_STATE_CANCEL_REMINDER = 7; public static GroupCallActivity groupCallInstance; public static boolean groupCallUiVisible; @@ -151,6 +163,12 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter private ActionBar actionBar; private ListAdapter listAdapter; private RecyclerListView listView; + private LinearLayout scheduleTimerContainer; + private TextView scheduleInfoTextView; + private TextView scheduleButtonTextView; + private SimpleTextView scheduleStartInTextView; + private SimpleTextView scheduleTimeTextView; + private SimpleTextView scheduleStartAtTextView; private DefaultItemAnimator itemAnimator; private FillLastLinearLayoutManager layoutManager; private VoIPToggleButton soundButton; @@ -171,11 +189,15 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter private View accountGap; private boolean changingPermissions; private HintView recordHintView; + private HintView reminderHintView; private ShareAlert shareAlert; private boolean delayedGroupCallUpdated; + private long creatingServiceTime; + private boolean callInitied; + private RectF rect = new RectF(); private boolean enterEventSent; @@ -209,10 +231,18 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter private final Matrix radialMatrix; private final Paint radialPaint; + private float switchToButtonProgress; + private float switchToButtonInt2; + private float scheduleButtonsScale; + private ValueAnimator scheduleAnimator; + private ValueAnimator muteButtonAnimator; + private TLRPC.InputPeer schedulePeer; public TLRPC.Chat currentChat; public ChatObject.Call call; + private boolean scheduleHasFewPeers; + private String scheduledHash; private RecordCallDrawable recordCallDrawable; private AudioPlayerAlert.ClippingTextViewSwitcher titleTextView; @@ -233,10 +263,12 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter private int muteButtonState = MUTE_BUTTON_STATE_UNMUTE; + private boolean startingGroupCall; + private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG | Paint.FILTER_BITMAP_FLAG); private Paint paintTmp = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG | Paint.FILTER_BITMAP_FLAG); private Paint leaveBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG); - private WeavingState[] states = new WeavingState[5]; + private WeavingState[] states = new WeavingState[8]; private float switchProgress = 1.0f; private WeavingState prevState; private WeavingState currentState; @@ -256,12 +288,49 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter private final int[] colorsTmp = new int[3]; View blurredView; + PinchToZoomHelper pinchToZoomHelper; private float progressToAvatarPreview; private View scrimPopupLayout; private boolean avatarsPreviewShowed; + ImageUpdater currentAvatarUpdater; + AvatarUpdaterDelegate avatarUpdaterDelegate; + + private int scheduleStartAt; + private boolean contentFullyOverlayed; + + private Runnable updateSchedeulRunnable = new Runnable() { + @Override + public void run() { + if (scheduleTimeTextView == null || isDismissed()) { + return; + } + int time; + if (call != null) { + time = call.call.schedule_date; + } else { + time = scheduleStartAt; + } + if (time == 0) { + return; + } + int diff = time - accountInstance.getConnectionsManager().getCurrentTime(); + if (diff >= 24 * 60 * 60) { + scheduleTimeTextView.setText(LocaleController.formatPluralString("Days", Math.round(diff / (24 * 60 * 60.0f)))); + } else { + scheduleTimeTextView.setText(AndroidUtilities.formatFullDuration(Math.abs(diff))); + if (diff < 0 && scheduleStartInTextView.getTag() == null) { + scheduleStartInTextView.setTag(1); + scheduleStartInTextView.setText(LocaleController.getString("VoipChatLateBy", R.string.VoipChatLateBy)); + } + } + scheduleStartAtTextView.setText(LocaleController.formatStartsTime(time, 3)); + AndroidUtilities.runOnUIThread(updateSchedeulRunnable, 1000); + } + }; + private Runnable unmuteRunnable = () -> { if (VoIPService.getSharedInstance() == null) { return; @@ -270,7 +339,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter }; private Runnable pressRunnable = () -> { - if (!scheduled || VoIPService.getSharedInstance() == null) { + if (call == null || !scheduled || VoIPService.getSharedInstance() == null) { return; } muteButton.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); @@ -293,6 +362,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter }; private final FrameLayout avatarPreviewContainer; private final AvatarPreviewPagerIndicator avatarPagerIndicator; + private ViewGroup currentOptionsLayout; private static class SmallRecordCallDrawable extends Drawable { @@ -638,9 +708,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter int id = MessageObject.getPeerId(currentParticipant.peer); TLObject object; if (id > 0) { - object = MessagesController.getInstance(currentAccount).getUser(id); + object = accountInstance.getMessagesController().getUser(id); } else { - object = MessagesController.getInstance(currentAccount).getChat(-id); + object = accountInstance.getMessagesController().getChat(-id); } if (currentParticipant.volume == 0) { if (scrimPopupWindow != null) { @@ -787,7 +857,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter float y = top + size * (startY + (targetY - startY) * interpolation) - 200; float s; - if (currentState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || currentState == MUTE_BUTTON_STATE_RAISED_HAND) { + if (isGradientState(currentState)) { s = 1f; } else { s = currentState == MUTE_BUTTON_STATE_MUTE ? 4 : 2.5f; @@ -801,7 +871,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void setTarget() { - if (currentState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || currentState == MUTE_BUTTON_STATE_RAISED_HAND) { + if (isGradientState(currentState)) { targetX = 0.85f + 0.20f * Utilities.random.nextInt(100) / 100f; targetY = 1f; } else if (currentState == MUTE_BUTTON_STATE_MUTE) { @@ -814,6 +884,10 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } } + private static boolean isGradientState(int state) { + return state == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || state == MUTE_BUTTON_STATE_RAISED_HAND || state == MUTE_BUTTON_STATE_START_NOW || state == MUTE_BUTTON_STATE_SET_REMINDER || state == MUTE_BUTTON_STATE_CANCEL_REMINDER; + } + @SuppressWarnings("FieldCanBeLocal") private static class LabeledButton extends FrameLayout { @@ -901,11 +975,18 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter accountInstance.getNotificationCenter().removeObserver(this, NotificationCenter.chatInfoDidLoad); accountInstance.getNotificationCenter().removeObserver(this, NotificationCenter.didLoadChatAdmins); accountInstance.getNotificationCenter().removeObserver(this, NotificationCenter.applyGroupCallVisibleParticipants); + accountInstance.getNotificationCenter().removeObserver(this, NotificationCenter.userInfoDidLoad); + accountInstance.getNotificationCenter().removeObserver(this, NotificationCenter.mainUserInfoChanged); + accountInstance.getNotificationCenter().removeObserver(this, NotificationCenter.updateInterfaces); NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.webRtcMicAmplitudeEvent); NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.didEndCall); super.dismiss(); } + private boolean isStillConnecting() { + return currentCallState == VoIPService.STATE_WAIT_INIT || currentCallState == VoIPService.STATE_WAIT_INIT_ACK || currentCallState == VoIPService.STATE_CREATING || currentCallState == VoIPService.STATE_RECONNECTING; + } + @Override public void didReceivedNotification(int id, int account, Object... args) { if (id == NotificationCenter.groupCallUpdated) { @@ -914,6 +995,38 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (call.call instanceof TLRPC.TL_groupCallDiscarded) { dismiss(); } else { + if (creatingServiceTime == 0 && (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER || muteButtonState == MUTE_BUTTON_STATE_START_NOW || muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) && !call.isScheduled()) { + try { + Intent intent = new Intent(parentActivity, VoIPService.class); + intent.putExtra("chat_id", currentChat.id); + intent.putExtra("createGroupCall", false); + intent.putExtra("hasFewPeers", scheduleHasFewPeers); + intent.putExtra("peerChannelId", schedulePeer.channel_id); + intent.putExtra("peerChatId", schedulePeer.chat_id); + intent.putExtra("peerUserId", schedulePeer.user_id); + intent.putExtra("hash", scheduledHash); + intent.putExtra("peerAccessHash", schedulePeer.access_hash); + intent.putExtra("is_outgoing", true); + intent.putExtra("start_incall_activity", false); + intent.putExtra("account", accountInstance.getCurrentAccount()); + intent.putExtra("scheduleDate", scheduleStartAt); + parentActivity.startService(intent); + } catch (Throwable e) { + FileLog.e(e); + } + creatingServiceTime = SystemClock.elapsedRealtime(); + AndroidUtilities.runOnUIThread(() -> { + if (!isStillConnecting()) { + return; + } + updateState(true, false); + }, 3000); + } + if (!callInitied && VoIPService.getSharedInstance() != null) { + call.addSelfDummyParticipant(false); + initCreatedGroupCall(); + VoIPService.getSharedInstance().playConnectedSound(); + } updateItems(); for (int a = 0, N = listView.getChildCount(); a < N; a++) { View child = listView.getChildAt(a); @@ -946,7 +1059,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } else if (id == NotificationCenter.webRtcMicAmplitudeEvent) { float amplitude = (float) args[0]; setAmplitude(amplitude * 4000.0f); - if (listView != null) { + if (call != null && listView != null) { TLRPC.TL_groupCallParticipant participant = call.participants.get(MessageObject.getPeerId(selfPeer)); if (participant != null) { ArrayList array = delayedGroupCallUpdated ? oldParticipants : call.sortedParticipants; @@ -957,7 +1070,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter GroupCallUserCell cell = (GroupCallUserCell) holder.itemView; cell.setAmplitude(amplitude * 15.0f); if (holder.itemView == scrimView) { - containerView.invalidate(); + if (!contentFullyOverlayed) { + containerView.invalidate(); + } } } } @@ -994,6 +1109,27 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter updateItems(); updateState(isShowing(), false); } + int selfId = MessageObject.getPeerId(selfPeer); + if (call != null && chatFull.id == -selfId) { + TLRPC.TL_groupCallParticipant participant = call.participants.get(selfId); + if (participant != null) { + participant.about = chatFull.about; + applyCallParticipantUpdates(); + AndroidUtilities.updateVisibleRows(listView); + + if (currentOptionsLayout != null) { + for (int i = 0; i < currentOptionsLayout.getChildCount(); i++) { + View child = currentOptionsLayout.getChildAt(i); + if (child instanceof ActionBarMenuSubItem && child.getTag() != null && (Integer) child.getTag() == 10) { + ((ActionBarMenuSubItem) child).setTextAndIcon( + TextUtils.isEmpty(participant.about) ? LocaleController.getString("VoipAddDescription", R.string.VoipAddDescription) : LocaleController.getString("VoipEditDescription", R.string.VoipEditDescription), + TextUtils.isEmpty(participant.about) ? R.drawable.msg_addbio : R.drawable.msg_bio + ); + } + } + } + } + } } else if (id == NotificationCenter.didLoadChatAdmins) { int chatId = (Integer) args[0]; if (chatId == currentChat.id) { @@ -1011,11 +1147,42 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter cell.getParticipant().lastVisibleDate = time; } } + } else if (id == NotificationCenter.userInfoDidLoad) { + Integer uid = (Integer) args[0]; + int selfId = MessageObject.getPeerId(selfPeer); + if (call != null && selfId == uid) { + TLRPC.TL_groupCallParticipant participant = call.participants.get(selfId); + TLRPC.UserFull userInfo = (TLRPC.UserFull) args[1]; + participant.about = userInfo.about; + applyCallParticipantUpdates(); + AndroidUtilities.updateVisibleRows(listView); + + if (currentOptionsLayout != null) { + for (int i = 0; i < currentOptionsLayout.getChildCount(); i++) { + View child = currentOptionsLayout.getChildAt(i); + if (child instanceof ActionBarMenuSubItem && child.getTag() != null && (Integer) child.getTag() == 10) { + ((ActionBarMenuSubItem) child).setTextAndIcon( + TextUtils.isEmpty(participant.about) ? LocaleController.getString("VoipAddBio", R.string.VoipAddBio) : LocaleController.getString("VoipEditBio", R.string.VoipEditBio), + TextUtils.isEmpty(participant.about) ? R.drawable.msg_addbio : R.drawable.msg_bio + ); + } + } + } + } + } else if (id == NotificationCenter.mainUserInfoChanged) { + applyCallParticipantUpdates(); + AndroidUtilities.updateVisibleRows(listView); + } else if (id == NotificationCenter.updateInterfaces) { + int mask = (int) args[0]; + if ((mask & MessagesController.UPDATE_MASK_CHAT_NAME) != 0) { + applyCallParticipantUpdates(); + AndroidUtilities.updateVisibleRows(listView); + } } } private void applyCallParticipantUpdates() { - if (delayedGroupCallUpdated) { + if (call == null || delayedGroupCallUpdated) { return; } int self = MessageObject.getPeerId(call.selfPeer); @@ -1070,6 +1237,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void updateRecordCallText() { + if (call == null) { + return; + } int time = accountInstance.getConnectionsManager().getCurrentTime() - call.call.record_start_date; if (call.recording) { recordItem.setSubtext(AndroidUtilities.formatDuration(time, false)); @@ -1079,6 +1249,14 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void updateItems() { + if (call == null || call.isScheduled()) { + pipItem.setVisibility(View.INVISIBLE); + if (call == null) { + otherItem.setVisibility(View.GONE); + accountSwitchImageView.setVisibility(View.GONE); + return; + } + } if (changingPermissions) { return; } @@ -1096,7 +1274,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (ChatObject.canManageCalls(currentChat)) { leaveItem.setVisibility(View.VISIBLE); editTitleItem.setVisibility(View.VISIBLE); - recordItem.setVisibility(View.VISIBLE); + if (call.isScheduled()) { + recordItem.setVisibility(View.GONE); + } else { + recordItem.setVisibility(View.VISIBLE); + } anyVisible = true; recordCallDrawable.setRecording(call.recording); if (call.recording) { @@ -1129,7 +1311,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter otherItem.setVisibility(anyVisible ? View.VISIBLE : View.GONE); int margin = 48; - if (VoIPService.getSharedInstance() != null && VoIPService.getSharedInstance().hasFewPeers) { + if (VoIPService.getSharedInstance() != null && VoIPService.getSharedInstance().hasFewPeers || scheduleHasFewPeers) { if (!anyVisible) { anyVisible = true; accountSwitchImageView.getImageReceiver().setCurrentAccount(currentAccount); @@ -1137,11 +1319,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (peerId > 0) { TLRPC.User user = accountInstance.getMessagesController().getUser(peerId); accountSwitchAvatarDrawable.setInfo(user); - accountSwitchImageView.setImage(ImageLocation.getForUser(user, false), "50_50", accountSwitchAvatarDrawable, user); + accountSwitchImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", accountSwitchAvatarDrawable, user); } else { TLRPC.Chat chat = accountInstance.getMessagesController().getChat(-peerId); accountSwitchAvatarDrawable.setInfo(chat); - accountSwitchImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", accountSwitchAvatarDrawable, chat); + accountSwitchImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", accountSwitchAvatarDrawable, chat); } accountSelectCell.setVisibility(View.GONE); accountGap.setVisibility(View.GONE); @@ -1220,30 +1402,56 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } } - public static void create(LaunchActivity activity, AccountInstance account) { - if (groupCallInstance != null || VoIPService.getSharedInstance() == null) { + public static void create(LaunchActivity activity, AccountInstance account, TLRPC.Chat scheduleChat, TLRPC.InputPeer schedulePeer, boolean hasFewPeers, String scheduledHash) { + if (groupCallInstance != null || schedulePeer == null && VoIPService.getSharedInstance() == null) { return; } - ChatObject.Call call = VoIPService.getSharedInstance().groupCall; - if (call == null) { - return; + if (schedulePeer != null) { + ChatObject.Call call = account.getMessagesController().getGroupCall(scheduleChat.id, false); + groupCallInstance = new GroupCallActivity(activity, account, call, scheduleChat, schedulePeer, hasFewPeers, scheduledHash); + } else { + ChatObject.Call call = VoIPService.getSharedInstance().groupCall; + if (call == null) { + return; + } + TLRPC.Chat chat = account.getMessagesController().getChat(call.chatId); + if (chat == null) { + return; + } + call.addSelfDummyParticipant(true); + groupCallInstance = new GroupCallActivity(activity, account, call, chat, null, hasFewPeers, scheduledHash); } - TLRPC.Chat chat = account.getMessagesController().getChat(call.chatId); - if (chat == null) { - return; - } - call.addSelfDummyParticipant(); - groupCallInstance = new GroupCallActivity(activity, account, call, chat); groupCallInstance.parentActivity = activity; groupCallInstance.show(); } - private GroupCallActivity(Context context, AccountInstance account, ChatObject.Call call, TLRPC.Chat chat) { + private GroupCallActivity(Context context, AccountInstance account, ChatObject.Call groupCall, TLRPC.Chat chat, TLRPC.InputPeer schedulePeer, boolean scheduleHasFewPeers, String scheduledHash) { super(context, false); this.accountInstance = account; - this.call = call; + this.call = groupCall; + this.schedulePeer = schedulePeer; this.currentChat = chat; + this.scheduledHash = scheduledHash; this.currentAccount = account.getCurrentAccount(); + this.scheduleHasFewPeers = scheduleHasFewPeers; + setDelegate(new BottomSheetDelegateInterface() { + @Override + public void onOpenAnimationStart() { + + } + + @Override + public void onOpenAnimationEnd() { + if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + showReminderHint(); + } + } + + @Override + public boolean canDismiss() { + return true; + } + }); drawNavigationBar = true; if (Build.VERSION.SDK_INT >= 30) { getWindow().setNavigationBarColor(0xff000000); @@ -1271,10 +1479,248 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter setDimBehindAlpha(75); - oldParticipants.addAll(call.sortedParticipants); - oldInvited.addAll(call.invitedUsers); + listAdapter = new ListAdapter(context); - TLRPC.InputPeer peer = VoIPService.getSharedInstance().getGroupCallPeer(); + actionBar = new ActionBar(context) { + @Override + public void setAlpha(float alpha) { + super.setAlpha(alpha); + containerView.invalidate(); + } + }; + actionBar.setBackButtonImage(R.drawable.ic_ab_back); + actionBar.setOccupyStatusBar(false); + actionBar.setAllowOverlayTitle(false); + actionBar.setItemsColor(Theme.getColor(Theme.key_voipgroup_actionBarItems), false); + actionBar.setItemsBackgroundColor(Theme.getColor(Theme.key_actionBarActionModeDefaultSelector), false); + actionBar.setTitleColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); + actionBar.setSubtitleColor(Theme.getColor(Theme.key_voipgroup_lastSeenTextUnscrolled)); + actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() { + @Override + public void onItemClick(int id) { + if (id == -1) { + dismiss(); + } else if (id == eveyone_can_speak_item) { + call.call.join_muted = false; + toggleAdminSpeak(); + } else if (id == admin_can_speak_item) { + call.call.join_muted = true; + toggleAdminSpeak(); + } else if (id == share_invite_link_item) { + getLink(false); + } else if (id == leave_item) { + AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + + builder.setTitle(LocaleController.getString("VoipGroupEndAlertTitle", R.string.VoipGroupEndAlertTitle)); + builder.setMessage(LocaleController.getString("VoipGroupEndAlertText", R.string.VoipGroupEndAlertText)); + builder.setDialogButtonColorKey(Theme.key_voipgroup_listeningText); + + builder.setPositiveButton(LocaleController.getString("VoipGroupEnd", R.string.VoipGroupEnd), (dialogInterface, i) -> { + if (call.isScheduled()) { + TLRPC.ChatFull chatFull = accountInstance.getMessagesController().getChatFull(currentChat.id); + if (chatFull != null) { + chatFull.flags &=~ 2097152; + chatFull.call = null; + accountInstance.getNotificationCenter().postNotificationName(NotificationCenter.groupCallUpdated, currentChat.id, call.call.id, false); + } + TLRPC.TL_phone_discardGroupCall req = new TLRPC.TL_phone_discardGroupCall(); + req.call = call.getInputGroupCall(); + accountInstance.getConnectionsManager().sendRequest(req, (response, error) -> { + if (response instanceof TLRPC.TL_updates) { + TLRPC.TL_updates updates = (TLRPC.TL_updates) response; + accountInstance.getMessagesController().processUpdates(updates, false); + } + }); + } else if (VoIPService.getSharedInstance() != null) { + VoIPService.getSharedInstance().hangUp(1); + } + dismiss(); + NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.didStartedCall); + }); + builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); + AlertDialog dialog = builder.create(); + + dialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_dialogBackground)); + dialog.show(); + TextView button = (TextView) dialog.getButton(DialogInterface.BUTTON_POSITIVE); + if (button != null) { + button.setTextColor(Theme.getColor(Theme.key_voipgroup_leaveCallMenu)); + } + dialog.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); + } else if (id == start_record_item) { + AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + builder.setDialogButtonColorKey(Theme.key_voipgroup_listeningText); + EditTextBoldCursor editText; + if (call.recording) { + builder.setTitle(LocaleController.getString("VoipGroupStopRecordingTitle", R.string.VoipGroupStopRecordingTitle)); + builder.setMessage(LocaleController.getString("VoipGroupStopRecordingText", R.string.VoipGroupStopRecordingText)); + editText = null; + } else { + enterEventSent = false; + builder.setTitle(LocaleController.getString("VoipGroupStartRecordingTitle", R.string.VoipGroupStartRecordingTitle)); + builder.setMessage(LocaleController.getString("VoipGroupStartRecordingText", R.string.VoipGroupStartRecordingText)); + builder.setCheckFocusable(false); + + editText = new EditTextBoldCursor(getContext()); + editText.setBackgroundDrawable(Theme.createEditTextDrawable(getContext(), true)); + + LinearLayout linearLayout = new LinearLayout(getContext()); + linearLayout.setOrientation(LinearLayout.VERTICAL); + builder.setView(linearLayout); + + editText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); + editText.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); + editText.setMaxLines(1); + editText.setLines(1); + editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); + editText.setGravity(Gravity.LEFT | Gravity.TOP); + editText.setSingleLine(true); + editText.setHint(LocaleController.getString("VoipGroupSaveFileHint", R.string.VoipGroupSaveFileHint)); + editText.setImeOptions(EditorInfo.IME_ACTION_DONE); + editText.setHintTextColor(Theme.getColor(Theme.key_voipgroup_lastSeenText)); + editText.setCursorColor(Theme.getColor(Theme.key_voipgroup_nameText)); + editText.setCursorSize(AndroidUtilities.dp(20)); + editText.setCursorWidth(1.5f); + editText.setPadding(0, AndroidUtilities.dp(4), 0, 0); + linearLayout.addView(editText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 36, Gravity.TOP | Gravity.LEFT, 24, 0, 24, 12)); + editText.setOnEditorActionListener((textView, i2, keyEvent) -> { + AndroidUtilities.hideKeyboard(textView); + builder.create().getButton(AlertDialog.BUTTON_POSITIVE).callOnClick(); + return false; + }); + + final AlertDialog alertDialog = builder.create(); + alertDialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_inviteMembersBackground)); + alertDialog.setOnShowListener(dialog -> makeFocusable(null, alertDialog, editText, true)); + alertDialog.setOnDismissListener(dialog -> AndroidUtilities.hideKeyboard(editText)); + } + + builder.setPositiveButton(call.recording ? LocaleController.getString("Stop", R.string.Stop) : LocaleController.getString("Start", R.string.Start), (dialogInterface, i) -> { + if (editText == null) { + call.toggleRecord(null); + getUndoView().showWithAction(0, UndoView.ACTION_VOIP_RECORDING_FINISHED, null); + } else { + call.toggleRecord(editText.getText().toString()); + AndroidUtilities.hideKeyboard(editText); + getUndoView().showWithAction(0, UndoView.ACTION_VOIP_RECORDING_STARTED, null); + if (VoIPService.getSharedInstance() != null) { + VoIPService.getSharedInstance().playStartRecordSound(); + } + } + }); + builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), (dialog, which) -> AndroidUtilities.hideKeyboard(editText)); + AlertDialog dialog = builder.create(); + dialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_dialogBackground)); + dialog.show(); + dialog.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); + if (editText != null) { + editText.requestFocus(); + } + } else if (id == permission_item) { + changingPermissions = true; + everyoneItem.setVisibility(View.VISIBLE); + adminItem.setVisibility(View.VISIBLE); + + accountGap.setVisibility(View.GONE); + inviteItem.setVisibility(View.GONE); + leaveItem.setVisibility(View.GONE); + permissionItem.setVisibility(View.GONE); + editTitleItem.setVisibility(View.GONE); + recordItem.setVisibility(View.GONE); + accountSelectCell.setVisibility(View.GONE); + otherItem.forceUpdatePopupPosition(); + } else if (id == edit_item) { + enterEventSent = false; + final EditTextBoldCursor editText = new EditTextBoldCursor(getContext()); + editText.setBackgroundDrawable(Theme.createEditTextDrawable(getContext(), true)); + + AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + builder.setDialogButtonColorKey(Theme.key_voipgroup_listeningText); + builder.setTitle(LocaleController.getString("VoipGroupTitle", R.string.VoipGroupTitle)); + builder.setCheckFocusable(false); + builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), (dialog, which) -> AndroidUtilities.hideKeyboard(editText)); + + LinearLayout linearLayout = new LinearLayout(getContext()); + linearLayout.setOrientation(LinearLayout.VERTICAL); + builder.setView(linearLayout); + + editText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); + editText.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); + editText.setMaxLines(1); + editText.setLines(1); + editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); + editText.setGravity(Gravity.LEFT | Gravity.TOP); + editText.setSingleLine(true); + editText.setImeOptions(EditorInfo.IME_ACTION_DONE); + editText.setHint(currentChat.title); + editText.setHintTextColor(Theme.getColor(Theme.key_voipgroup_lastSeenText)); + editText.setCursorColor(Theme.getColor(Theme.key_voipgroup_nameText)); + editText.setCursorSize(AndroidUtilities.dp(20)); + editText.setCursorWidth(1.5f); + editText.setPadding(0, AndroidUtilities.dp(4), 0, 0); + linearLayout.addView(editText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 36, Gravity.TOP | Gravity.LEFT, 24, 6, 24, 0)); + editText.setOnEditorActionListener((textView, i, keyEvent) -> { + AndroidUtilities.hideKeyboard(textView); + builder.create().getButton(AlertDialog.BUTTON_POSITIVE).callOnClick(); + return false; + }); + editText.addTextChangedListener(new TextWatcher() { + + boolean ignoreTextChange; + + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + + } + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + + } + + @Override + public void afterTextChanged(Editable s) { + if (ignoreTextChange) { + return; + } + if (s.length() > 40) { + ignoreTextChange = true; + s.delete(40, s.length()); + AndroidUtilities.shakeView(editText, 2, 0); + editText.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); + ignoreTextChange = false; + } + } + }); + if (!TextUtils.isEmpty(call.call.title)) { + editText.setText(call.call.title); + editText.setSelection(editText.length()); + } + builder.setPositiveButton(LocaleController.getString("Save", R.string.Save), (dialog, which) -> { + AndroidUtilities.hideKeyboard(editText); + call.setTitle(editText.getText().toString()); + builder.getDismissRunnable().run(); + }); + + final AlertDialog alertDialog = builder.create(); + alertDialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_inviteMembersBackground)); + alertDialog.setOnShowListener(dialog -> makeFocusable(null, alertDialog, editText, true)); + alertDialog.setOnDismissListener(dialog -> AndroidUtilities.hideKeyboard(editText)); + alertDialog.show(); + alertDialog.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); + editText.requestFocus(); + } else if (id == user_item) { + accountSwitchImageView.callOnClick(); + } + } + }); + + TLRPC.InputPeer peer; + if (schedulePeer != null) { + peer = schedulePeer; + } else { + peer = VoIPService.getSharedInstance().getGroupCallPeer(); + } if (peer == null) { selfPeer = new TLRPC.TL_peerUser(); selfPeer.user_id = accountInstance.getUserConfig().getClientUserId(); @@ -1289,8 +1735,6 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter selfPeer.chat_id = peer.chat_id; } - currentCallState = VoIPService.getSharedInstance().getCallState(); - VoIPService.audioLevelsCallback = (uids, levels, voice) -> { for (int a = 0; a < uids.length; a++) { TLRPC.TL_groupCallParticipant participant = call.participantsBySources.get(uids[a]); @@ -1316,13 +1760,16 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter accountInstance.getNotificationCenter().addObserver(this, NotificationCenter.chatInfoDidLoad); accountInstance.getNotificationCenter().addObserver(this, NotificationCenter.didLoadChatAdmins); accountInstance.getNotificationCenter().addObserver(this, NotificationCenter.applyGroupCallVisibleParticipants); + accountInstance.getNotificationCenter().addObserver(this, NotificationCenter.userInfoDidLoad); + accountInstance.getNotificationCenter().addObserver(this, NotificationCenter.mainUserInfoChanged); + accountInstance.getNotificationCenter().addObserver(this, NotificationCenter.updateInterfaces); NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.webRtcMicAmplitudeEvent); NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.didEndCall); shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate(); - bigMicDrawable = new RLottieDrawable(R.raw.voice_outlined2, "" + R.raw.voice_outlined2, AndroidUtilities.dp(57), AndroidUtilities.dp(55), true, null); - handDrawables = new RLottieDrawable(R.raw.hand_1, "" + R.raw.hand_1, AndroidUtilities.dp(57), AndroidUtilities.dp(55), true, null); + bigMicDrawable = new RLottieDrawable(R.raw.voip_filled, "" + R.raw.voip_filled, AndroidUtilities.dp(72), AndroidUtilities.dp(72), true, null); + handDrawables = new RLottieDrawable(R.raw.hand_2, "" + R.raw.hand_2, AndroidUtilities.dp(72), AndroidUtilities.dp(72), true, null); containerView = new FrameLayout(context) { @@ -1335,7 +1782,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter int totalHeight = MeasureSpec.getSize(heightMeasureSpec); if (Build.VERSION.SDK_INT >= 21) { ignoreLayout = true; - setPadding(backgroundPaddingLeft, AndroidUtilities.statusBarHeight, backgroundPaddingLeft, 0); + setPadding(backgroundPaddingLeft, statusBarHeight, backgroundPaddingLeft, 0); ignoreLayout = false; } int availableHeight = totalHeight - getPaddingTop() - AndroidUtilities.dp(14 + 231); @@ -1348,11 +1795,31 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter int contentSize = Math.max(AndroidUtilities.dp(64 + 50 + 58 * 2.5f), availableHeight / 5 * 3); int padding = Math.max(0, availableHeight - contentSize + AndroidUtilities.dp(8)); + ignoreLayout = true; if (listView.getPaddingTop() != padding) { - ignoreLayout = true; listView.setPadding(0, padding, 0, 0); - ignoreLayout = false; } + if (scheduleStartAtTextView != null) { + int y = padding + (availableHeight - padding + AndroidUtilities.dp(60)) / 2; + FrameLayout.LayoutParams layoutParams1 = (FrameLayout.LayoutParams) scheduleStartInTextView.getLayoutParams(); + layoutParams1.topMargin = y - AndroidUtilities.dp(30); + + FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) scheduleStartAtTextView.getLayoutParams(); + layoutParams2.topMargin = y + AndroidUtilities.dp(80); + + FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) scheduleTimeTextView.getLayoutParams(); + + if (layoutParams1.topMargin < ActionBar.getCurrentActionBarHeight() || layoutParams2.topMargin + AndroidUtilities.dp(20) > totalHeight - AndroidUtilities.dp(231)) { + scheduleStartInTextView.setVisibility(INVISIBLE); + scheduleStartAtTextView.setVisibility(INVISIBLE); + layoutParams3.topMargin = y - AndroidUtilities.dp(20); + } else { + scheduleStartInTextView.setVisibility(VISIBLE); + scheduleStartAtTextView.setVisibility(VISIBLE); + layoutParams3.topMargin = y; + } + } + ignoreLayout = false; super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(totalHeight, MeasureSpec.EXACTLY)); int currentSize = getMeasuredHeight() + (getMeasuredWidth() << 16); if (currentSize != lastSize) { @@ -1386,7 +1853,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter return true; } } - if (ev.getAction() == MotionEvent.ACTION_DOWN && scrollOffsetY != 0 && ev.getY() < scrollOffsetY - AndroidUtilities.dp(37) && actionBar.getAlpha() == 0.0f) { + if (ev.getAction() == MotionEvent.ACTION_DOWN && scrollOffsetY != 0 && ev.getY() < scrollOffsetY - AndroidUtilities.dp(37) && actionBar.getAlpha() == 0.0f && !avatarsPreviewShowed) { dismiss(); return true; } @@ -1437,7 +1904,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter int finalColor = Color.argb((int) (255 * actionBar.getAlpha()), (int) (Color.red(backgroundColor) * 0.8f), (int) (Color.green(backgroundColor) * 0.8f), (int) (Color.blue(backgroundColor) * 0.8f)); Theme.dialogs_onlineCirclePaint.setColor(finalColor); - canvas.drawRect(backgroundPaddingLeft, 0, getMeasuredWidth() - backgroundPaddingLeft, AndroidUtilities.statusBarHeight, Theme.dialogs_onlineCirclePaint); + canvas.drawRect(backgroundPaddingLeft, 0, getMeasuredWidth() - backgroundPaddingLeft, statusBarHeight, Theme.dialogs_onlineCirclePaint); } @Override @@ -1451,7 +1918,6 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter Path roundPath = new Path(); int count = listView.getChildCount(); - float viewClipTop = listTop; float viewClipBottom = listView.getY() + listView.getMeasuredHeight(); for (int num = 0; num < count; num++) { @@ -1461,10 +1927,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } - if (viewClipTop < viewClipBottom) { -// + if (listTop < viewClipBottom) { canvas.save(); - canvas.clipRect(0, viewClipTop * (1f - progressToAvatarPreview), getMeasuredWidth(), viewClipBottom * (1f - progressToAvatarPreview) + getMeasuredHeight() * progressToAvatarPreview); + canvas.clipRect(0, listTop * (1f - progressToAvatarPreview), getMeasuredWidth(), viewClipBottom * (1f - progressToAvatarPreview) + getMeasuredHeight() * progressToAvatarPreview); float childY = (listView.getY() + child.getY()) * (1f - progressToAvatarPreview) + (avatarPreviewContainer.getTop() + avatarPreviewContainer.getMeasuredWidth()) * progressToAvatarPreview; float childX = (listView.getLeft() + child.getX()) * (1f - progressToAvatarPreview) + avatarPreviewContainer.getLeft() * progressToAvatarPreview; @@ -1473,7 +1938,6 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter float pr = 1.0f - CubicBezierInterpolator.EASE_OUT.getInterpolation(1.0f - progress); int h = (int) (scrimView.getMeasuredHeight() + (scrimView.getClipHeight() - scrimView.getMeasuredHeight()) * pr); rect.set(0, 0, child.getMeasuredWidth(), h); - //scrimView.setAboutVisibleProgress(listViewBackgroundPaint.getColor(), progressToAvatarPreview); scrimView.setProgressToAvatarPreview(progressToAvatarPreview); for (int i = 0; i < 4; i++) { radii[i] = AndroidUtilities.dp(13) * (1f - progressToAvatarPreview); @@ -1507,12 +1971,14 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } } - canvas.save(); - canvas.clipRect(0, viewClipTop * (1f - progressToAvatarPreview), getMeasuredWidth(), viewClipBottom * (1f - progressToAvatarPreview) + getMeasuredHeight() * progressToAvatarPreview); - canvas.scale(avatarPreviewContainer.getScaleX(), avatarPreviewContainer.getScaleY(), avatarPreviewContainer.getX(), avatarPreviewContainer.getY()); - canvas.translate(avatarPreviewContainer.getX(), avatarPreviewContainer.getY()); - avatarPreviewContainer.draw(canvas); - canvas.restore(); + if (!pinchToZoomHelper.isInOverlayMode()) { + canvas.save(); + canvas.clipRect(0, listTop * (1f - progressToAvatarPreview), getMeasuredWidth(), viewClipBottom * (1f - progressToAvatarPreview) + getMeasuredHeight() * progressToAvatarPreview); + canvas.scale(avatarPreviewContainer.getScaleX(), avatarPreviewContainer.getScaleY(), avatarPreviewContainer.getX(), avatarPreviewContainer.getY()); + canvas.translate(avatarPreviewContainer.getX(), avatarPreviewContainer.getY()); + avatarPreviewContainer.draw(canvas); + canvas.restore(); + } } } else { if (scrimView != null) { @@ -1561,6 +2027,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (child == avatarPreviewContainer || child == scrimPopupLayout) { return true; } + if (contentFullyOverlayed) { + if (child == listView || child == buttonsContainer) { + return true; + } + } return super.drawChild(canvas, child, drawingTime); } @@ -1580,6 +2051,102 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter containerView.setKeepScreenOn(true); containerView.setClipChildren(false); + if (schedulePeer != null) { + scheduleStartInTextView = new SimpleTextView(context); + scheduleStartInTextView.setGravity(Gravity.CENTER); + scheduleStartInTextView.setTextColor(0xffffffff); + scheduleStartInTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); + scheduleStartInTextView.setTextSize(18); + scheduleStartInTextView.setText(LocaleController.getString("VoipChatStartsIn", R.string.VoipChatStartsIn)); + containerView.addView(scheduleStartInTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 21, 0, 21, 231 + 80)); //-80 + + scheduleTimeTextView = new SimpleTextView(context) { + + private LinearGradient linearGradient; + private int lastTextWidth; + private Matrix matrix = new Matrix(); + private float targetX = -1f; + private float startX; + private float duration; + private float time; + private float gradientWidth; + private long lastUpdateTime; + + private void setTarget() { + targetX = 0.20f * (Utilities.random.nextInt(100) - 50) / 50.0f; + } + + @Override + protected boolean createLayout(int width) { + boolean result = super.createLayout(width); + int w = getTextWidth(); + if (w != lastTextWidth) { + gradientWidth = w * 1.3f; + linearGradient = new LinearGradient(0, getTextHeight(), w * 2.0f, 0, new int[]{Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient), Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient3), Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient2), Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient2)}, new float[]{0.0f, 0.38f, 0.76f, 1.0f}, Shader.TileMode.CLAMP); + getPaint().setShader(linearGradient); + lastTextWidth = w; + } + return result; + } + + @Override + protected void onDraw(Canvas canvas) { + float moveProgress = 0.0f; + if (linearGradient != null) { + if (call != null && call.isScheduled()) { + long diff = ((long) call.call.schedule_date) * 1000 - accountInstance.getConnectionsManager().getCurrentTimeMillis(); + if (diff < 0) { + moveProgress = 1.0f; + } else if (diff < 5000) { + moveProgress = 1.0f - diff / 5000.0f; + } + } + matrix.reset(); + matrix.postTranslate(-lastTextWidth * 0.7f * moveProgress, 0); + + long newTime = SystemClock.elapsedRealtime(); + long dt = newTime - lastUpdateTime; + if (dt > 20) { + dt = 17; + } + lastUpdateTime = newTime; + if (duration == 0 || time >= duration) { + duration = Utilities.random.nextInt(200) + 1500; + time = 0; + if (targetX == -1f) { + setTarget(); + } + startX = targetX; + setTarget(); + } + time += dt * (0.5f + BlobDrawable.GRADIENT_SPEED_MIN) + dt * (BlobDrawable.GRADIENT_SPEED_MAX * 2) * amplitude; + if (time > duration) { + time = duration; + } + float interpolation = CubicBezierInterpolator.EASE_OUT.getInterpolation(time / duration); + float x = gradientWidth * (startX + (targetX - startX) * interpolation) - gradientWidth / 2; + matrix.postTranslate(x, 0); + + linearGradient.setLocalMatrix(matrix); + invalidate(); + } + super.onDraw(canvas); + } + }; + scheduleTimeTextView.setGravity(Gravity.CENTER); + scheduleTimeTextView.setTextColor(0xffffffff); + scheduleTimeTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); + scheduleTimeTextView.setTextSize(60); + containerView.addView(scheduleTimeTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 21, 0, 21, 231)); + + scheduleStartAtTextView = new SimpleTextView(context); + scheduleStartAtTextView.setGravity(Gravity.CENTER); + scheduleStartAtTextView.setTextColor(0xffffffff); + scheduleStartAtTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); + scheduleStartAtTextView.setTextSize(18); + containerView.addView(scheduleStartAtTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 21, 0, 21, 231 - 30)); //+ 30 + } + listView = new RecyclerListView(context) { @Override @@ -1607,6 +2174,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter minTop = Math.min(minTop, Math.max(0, child.getY())); } } + rect.set(0, minTop, getMeasuredWidth(), Math.min(getMeasuredHeight(), maxBottom)); canvas.drawRoundRect(rect, AndroidUtilities.dp(13), AndroidUtilities.dp(13), listViewBackgroundPaint); @@ -1630,7 +2198,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter listView.setOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { - if (listView.getChildCount() <= 0) { + if (listView.getChildCount() <= 0 || call == null) { return; } if (!call.loadingMembers && !call.membersLoadEndReached && layoutManager.findLastVisibleItemPosition() > listAdapter.getItemCount() - 5) { @@ -1655,6 +2223,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (recordHintView != null) { recordHintView.hide(); } + if (reminderHintView != null) { + reminderHintView.hide(); + } } scrolling = newState == RecyclerView.SCROLL_STATE_DRAGGING; } @@ -1664,15 +2235,12 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter listView.setLayoutManager(layoutManager = new FillLastLinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false, 0, listView)); layoutManager.setBind(false); containerView.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 14, 14, 14, 231)); - listView.setAdapter(listAdapter = new ListAdapter(context)); + listView.setAdapter(listAdapter); listView.setTopBottomSelectorRadius(13); listView.setSelectorDrawableColor(Theme.getColor(Theme.key_voipgroup_listSelector)); listView.setOnItemClickListener((view, position, x, y) -> { if (view instanceof GroupCallUserCell) { GroupCallUserCell cell = (GroupCallUserCell) view; - if (cell.isSelfUser() && !cell.isHandRaised()) { - return; - } showMenuForCell(cell); } else if (view instanceof GroupCallInvitedCell) { GroupCallInvitedCell cell = (GroupCallInvitedCell) view; @@ -1768,6 +2336,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter @SuppressLint("DrawAllocation") @Override protected void dispatchDraw(Canvas canvas) { + if (contentFullyOverlayed) { + return; + } int offset = (getMeasuredWidth() - getMeasuredHeight()) / 2; long newTime = SystemClock.elapsedRealtime(); @@ -1861,7 +2432,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter boolean showWaves = false; boolean showLighting = false; if (currentState != null) { - showWaves = currentState.currentState == MUTE_BUTTON_STATE_MUTE || currentState.currentState == MUTE_BUTTON_STATE_UNMUTE || currentState.currentState == MUTE_BUTTON_STATE_RAISED_HAND || currentState.currentState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN; + showWaves = currentState.currentState == MUTE_BUTTON_STATE_MUTE || currentState.currentState == MUTE_BUTTON_STATE_UNMUTE || isGradientState(currentState.currentState); showLighting = currentState.currentState != MUTE_BUTTON_STATE_CONNECTING; } @@ -1928,8 +2499,10 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter paint.setAlpha(76); - float radius = AndroidUtilities.dp(52) / 2f; - canvas.drawCircle(leaveButton.getX() + leaveButton.getMeasuredWidth() / 2f, leaveButton.getY() + radius, radius, leaveBackgroundPaint); + if (call != null) { + float radius = AndroidUtilities.dp(52) / 2f; + canvas.drawCircle(leaveButton.getX() + leaveButton.getMeasuredWidth() / 2f, leaveButton.getY() + radius, radius, leaveBackgroundPaint); + } canvas.save(); canvas.scale(BlobDrawable.GLOBAL_SCALE, BlobDrawable.GLOBAL_SCALE, cx, cy); @@ -1943,19 +2516,21 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter canvas.scale(scaleLight, scaleLight, cx, cy); canvas.drawCircle(cx, cy, AndroidUtilities.dp(160), radialPaint); canvas.restore(); - - canvas.restore(); - canvas.save(); - scale = BlobDrawable.SCALE_BIG_MIN + BlobDrawable.SCALE_BIG * amplitude; - canvas.scale(scale * showWavesProgressInterpolated, scale * showWavesProgressInterpolated, cx, cy); - bigWaveDrawable.draw(cx, cy, canvas, paint); canvas.restore(); - canvas.save(); - scale = BlobDrawable.SCALE_SMALL_MIN + BlobDrawable.SCALE_SMALL * amplitude; - canvas.scale(scale * showWavesProgressInterpolated, scale * showWavesProgressInterpolated, cx, cy); - tinyWaveDrawable.draw(cx, cy, canvas, paint); - canvas.restore(); + if (call != null) { + canvas.save(); + scale = BlobDrawable.SCALE_BIG_MIN + BlobDrawable.SCALE_BIG * amplitude * scheduleButtonsScale; + canvas.scale(scale * showWavesProgressInterpolated, scale * showWavesProgressInterpolated, cx, cy); + bigWaveDrawable.draw(cx, cy, canvas, paint); + canvas.restore(); + + canvas.save(); + scale = BlobDrawable.SCALE_SMALL_MIN + BlobDrawable.SCALE_SMALL * amplitude * scheduleButtonsScale; + canvas.scale(scale * showWavesProgressInterpolated, scale * showWavesProgressInterpolated, cx, cy); + tinyWaveDrawable.draw(cx, cy, canvas, paint); + canvas.restore(); + } paint.setAlpha(255); @@ -2002,43 +2577,63 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter radialMatrix.setTranslate(cx, cy); radialGradient.setLocalMatrix(radialMatrix); - paint.setAlpha((int) (76 * alpha)); - if (i == 1) { - float radius = AndroidUtilities.dp(52) / 2f; - canvas.drawCircle(leaveButton.getX() + leaveButton.getMeasuredWidth() / 2, leaveButton.getY() + radius, radius, leaveBackgroundPaint); + paint.setAlpha((int) (76 * alpha * switchToButtonProgress)); + if (switchToButtonProgress > 0) { + if (i == 1) { + int a = leaveBackgroundPaint.getAlpha(); + leaveBackgroundPaint.setAlpha((int) (a * switchToButtonProgress)); + float radius = AndroidUtilities.dp(52) / 2f; + canvas.drawCircle(leaveButton.getX() + leaveButton.getMeasuredWidth() / 2, leaveButton.getY() + radius, radius, leaveBackgroundPaint); + leaveBackgroundPaint.setAlpha(a); + } } canvas.save(); canvas.scale(BlobDrawable.GLOBAL_SCALE, BlobDrawable.GLOBAL_SCALE, cx, cy); canvas.save(); + float translation = AndroidUtilities.dp(89) * (1.0f - switchToButtonInt2); + cy += translation; float scale = BlobDrawable.SCALE_BIG_MIN + BlobDrawable.SCALE_BIG * amplitude * 0.5f; canvas.scale(scale * showLightingProgress, scale * showLightingProgress, cx, cy); if (i == 1) { - float scaleLight = 0.7f + BlobDrawable.LIGHT_GRADIENT_SIZE; + float scaleLight = 0.7f + BlobDrawable.LIGHT_GRADIENT_SIZE * scheduleButtonsScale; canvas.save(); canvas.scale(scaleLight, scaleLight, cx, cy); + int a = radialPaint.getAlpha(); + radialPaint.setAlpha((int) (a * switchToButtonProgress)); canvas.drawCircle(cx, cy, AndroidUtilities.dp(160), radialPaint); + radialPaint.setAlpha(a); canvas.restore(); } canvas.restore(); - canvas.save(); - scale = BlobDrawable.SCALE_BIG_MIN + BlobDrawable.SCALE_BIG * amplitude; - canvas.scale(scale * showWavesProgressInterpolated, scale * showWavesProgressInterpolated, cx, cy); - bigWaveDrawable.draw(cx, cy, canvas, paint); - canvas.restore(); + if (switchToButtonProgress > 0) { + canvas.save(); + scale = BlobDrawable.SCALE_BIG_MIN + BlobDrawable.SCALE_BIG * amplitude * showWavesProgressInterpolated * scheduleButtonsScale; + canvas.scale(scale, scale, cx, cy); + bigWaveDrawable.draw(cx, cy, canvas, paint); + canvas.restore(); - canvas.save(); - scale = BlobDrawable.SCALE_SMALL_MIN + BlobDrawable.SCALE_SMALL * amplitude; - canvas.scale(scale * showWavesProgressInterpolated, scale * showWavesProgressInterpolated, cx, cy); - tinyWaveDrawable.draw(cx, cy, canvas, paint); - canvas.restore(); + canvas.save(); + scale = BlobDrawable.SCALE_SMALL_MIN + BlobDrawable.SCALE_SMALL * amplitude * showWavesProgressInterpolated * scheduleButtonsScale; + canvas.scale(scale, scale, cx, cy); + tinyWaveDrawable.draw(cx, cy, canvas, paint); + canvas.restore(); + } if (i == 0) { paint.setAlpha(255); } else { paint.setAlpha((int) (255 * alpha)); } - canvas.drawCircle(cx, cy, buttonRadius, paint); + + muteButton.setTranslationY(translation); + float startX = getMeasuredWidth() / 2 - AndroidUtilities.dp(21); + float startY = AndroidUtilities.dp(24); + float w = (startX + (buttonRadius - startX) * switchToButtonInt2) * scheduleButtonsScale; + float h = (startY + (buttonRadius - startY) * switchToButtonInt2) * scheduleButtonsScale; + rect.set(cx - w, cy - h, cx + w, cy + h); + float rad = AndroidUtilities.dp(4) + (buttonRadius - AndroidUtilities.dp(4)) * switchToButtonInt2; + canvas.drawRoundRect(rect, rad, rad, paint); canvas.restore(); @@ -2055,6 +2650,212 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter buttonsContainer.setWillNotDraw(false); containerView.addView(buttonsContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 231, Gravity.LEFT | Gravity.BOTTOM)); + if (schedulePeer != null) { + scheduleInfoTextView = new TextView(context); + scheduleInfoTextView.setGravity(Gravity.CENTER); + scheduleInfoTextView.setTextColor(0xff7B8389); + scheduleInfoTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); + if (ChatObject.isChannel(currentChat) && !currentChat.megagroup) { + scheduleInfoTextView.setTag(1); + } + containerView.addView(scheduleInfoTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 21, 0, 21, 100)); + + final NumberPicker dayPicker = new NumberPicker(context); + dayPicker.setTextColor(0xffffffff); + dayPicker.setSelectorColor(0xff6D89ED); + dayPicker.setTextOffset(AndroidUtilities.dp(10)); + dayPicker.setItemCount(5); + final NumberPicker hourPicker = new NumberPicker(context) { + @Override + protected CharSequence getContentDescription(int value) { + return LocaleController.formatPluralString("Hours", value); + } + }; + hourPicker.setItemCount(5); + hourPicker.setTextColor(0xffffffff); + hourPicker.setSelectorColor(0xff6D89ED); + hourPicker.setTextOffset(-AndroidUtilities.dp(10)); + final NumberPicker minutePicker = new NumberPicker(context) { + @Override + protected CharSequence getContentDescription(int value) { + return LocaleController.formatPluralString("Minutes", value); + } + }; + minutePicker.setItemCount(5); + minutePicker.setTextColor(0xffffffff); + minutePicker.setSelectorColor(0xff6D89ED); + minutePicker.setTextOffset(-AndroidUtilities.dp(34)); + + scheduleButtonTextView = new TextView(context); + scheduleButtonTextView.setLines(1); + scheduleButtonTextView.setSingleLine(true); + scheduleButtonTextView.setEllipsize(TextUtils.TruncateAt.END); + scheduleButtonTextView.setGravity(Gravity.CENTER); + scheduleButtonTextView.setBackground(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(4), 0, 0x3f000000)); + scheduleButtonTextView.setTextColor(0xffffffff); + scheduleButtonTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); + scheduleButtonTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); + containerView.addView(scheduleButtonTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 21, 0, 21, 20.5f)); + scheduleButtonTextView.setOnClickListener(v -> { + scheduleAnimator = ValueAnimator.ofFloat(0.0f, 1.0f); + scheduleAnimator.setDuration(600); + scheduleAnimator.addUpdateListener(a -> { + switchToButtonProgress = (float) a.getAnimatedValue(); + updateScheduleUI(true); + + buttonsContainer.invalidate(); + listView.invalidate(); + }); + scheduleAnimator.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + scheduleAnimator = null; + } + }); + scheduleAnimator.start(); + titleTextView.setText(LocaleController.getString("VoipGroupVoiceChat", R.string.VoipGroupVoiceChat), true); + Calendar calendar = Calendar.getInstance(); + boolean setSeconds = AlertsCreator.checkScheduleDate(null, null, 7 * 24 * 60 * 60, 3, dayPicker, hourPicker, minutePicker); + calendar.setTimeInMillis(System.currentTimeMillis() + (long) dayPicker.getValue() * 24 * 3600 * 1000); + calendar.set(Calendar.HOUR_OF_DAY, hourPicker.getValue()); + calendar.set(Calendar.MINUTE, minutePicker.getValue()); + if (setSeconds) { + calendar.set(Calendar.SECOND, 0); + } + scheduleStartAt = (int) (calendar.getTimeInMillis() / 1000); + updateScheduleUI(false); + + TLRPC.TL_phone_createGroupCall req = new TLRPC.TL_phone_createGroupCall(); + req.peer = MessagesController.getInputPeer(chat); + req.random_id = Utilities.random.nextInt(); + req.schedule_date = scheduleStartAt; + req.flags |= 2; + account.getConnectionsManager().sendRequest(req, (response, error) -> { + if (response != null) { + TLRPC.Updates updates = (TLRPC.Updates) response; + for (int a = 0; a < updates.updates.size(); a++) { + TLRPC.Update update = updates.updates.get(a); + if (update instanceof TLRPC.TL_updateGroupCall) { + TLRPC.TL_updateGroupCall updateGroupCall = (TLRPC.TL_updateGroupCall) update; + AndroidUtilities.runOnUIThread(() -> { + call = new ChatObject.Call(); + call.call = new TLRPC.TL_groupCall(); + call.call.participants_count = 0; + call.call.version = 1; + call.call.can_change_join_muted = true; + call.chatId = chat.id; + call.call.schedule_date = scheduleStartAt; + call.call.flags |= 128; + call.currentAccount = accountInstance; + call.setSelfPeer(peer); + call.call.access_hash = updateGroupCall.call.access_hash; + call.call.id = updateGroupCall.call.id; + accountInstance.getMessagesController().putGroupCall(call.chatId, call); + }); + break; + } + } + accountInstance.getMessagesController().processUpdates(updates, false); + } else { + AndroidUtilities.runOnUIThread(() -> { + accountInstance.getNotificationCenter().postNotificationName(NotificationCenter.needShowAlert, 6, error.text); + dismiss(); + }); + } + }, ConnectionsManager.RequestFlagFailOnServerErrors); + }); + + scheduleTimerContainer = new LinearLayout(context) { + + boolean ignoreLayout = false; + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + ignoreLayout = true; + int count = 5; + dayPicker.setItemCount(count); + hourPicker.setItemCount(count); + minutePicker.setItemCount(count); + dayPicker.getLayoutParams().height = AndroidUtilities.dp(54) * count; + hourPicker.getLayoutParams().height = AndroidUtilities.dp(54) * count; + minutePicker.getLayoutParams().height = AndroidUtilities.dp(54) * count; + ignoreLayout = false; + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + + @Override + public void requestLayout() { + if (ignoreLayout) { + return; + } + super.requestLayout(); + } + }; + scheduleTimerContainer.setWeightSum(1.0f); + scheduleTimerContainer.setOrientation(LinearLayout.HORIZONTAL); + containerView.addView(scheduleTimerContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 54 * 5, Gravity.TOP | Gravity.LEFT, 0, 50, 0, 0)); + + long currentTime = System.currentTimeMillis(); + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(currentTime); + int currentYear = calendar.get(Calendar.YEAR); + int currentDay = calendar.get(Calendar.DAY_OF_YEAR); + + scheduleTimerContainer.addView(dayPicker, LayoutHelper.createLinear(0, 54 * 5, 0.5f)); + dayPicker.setMinValue(0); + dayPicker.setMaxValue(365); + dayPicker.setWrapSelectorWheel(false); + dayPicker.setFormatter(value -> { + if (value == 0) { + return LocaleController.getString("MessageScheduleToday", R.string.MessageScheduleToday); + } else { + long date = currentTime + (long) value * 86400000L; + calendar.setTimeInMillis(date); + int year = calendar.get(Calendar.YEAR); + if (year == currentYear) { + return LocaleController.getInstance().formatterScheduleDay.format(date); + } else { + return LocaleController.getInstance().formatterScheduleYear.format(date); + } + } + }); + final NumberPicker.OnValueChangeListener onValueChangeListener = (picker, oldVal, newVal) -> { + try { + container.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); + } catch (Exception ignore) { + + } + AlertsCreator.checkScheduleDate(scheduleButtonTextView, scheduleInfoTextView, 7 * 24 * 60 * 60, 2, dayPicker, hourPicker, minutePicker); + }; + dayPicker.setOnValueChangedListener(onValueChangeListener); + + hourPicker.setMinValue(0); + hourPicker.setMaxValue(23); + scheduleTimerContainer.addView(hourPicker, LayoutHelper.createLinear(0, 54 * 5, 0.2f)); + hourPicker.setFormatter(value -> String.format("%02d", value)); + hourPicker.setOnValueChangedListener(onValueChangeListener); + + minutePicker.setMinValue(0); + minutePicker.setMaxValue(59); + minutePicker.setValue(0); + minutePicker.setFormatter(value -> String.format("%02d", value)); + scheduleTimerContainer.addView(minutePicker, LayoutHelper.createLinear(0, 54 * 5, 0.3f)); + minutePicker.setOnValueChangedListener(onValueChangeListener); + + calendar.setTimeInMillis(currentTime + 3 * 60 * 60 * 1000); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + int nextDay = calendar.get(Calendar.DAY_OF_YEAR); + int minute = calendar.get(Calendar.MINUTE); + int hour = calendar.get(Calendar.HOUR_OF_DAY); + dayPicker.setValue(currentDay != nextDay ? 1 : 0); + minutePicker.setValue(minute); + hourPicker.setValue(hour); + + AlertsCreator.checkScheduleDate(scheduleButtonTextView, scheduleInfoTextView, 7 * 24 * 60 * 60, 2, dayPicker, hourPicker, minutePicker); + } + int color = Theme.getColor(Theme.key_voipgroup_unmuteButton2); int r = Color.red(color); int g = Color.green(color); @@ -2083,6 +2884,10 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter soundButton.setTextSize(12); buttonsContainer.addView(soundButton, LayoutHelper.createFrame(68, 90)); soundButton.setOnClickListener(v -> { + if (call == null || call.isScheduled()) { + getLink(false); + return; + } if (VoIPService.getSharedInstance() == null) { return; } @@ -2095,6 +2900,10 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter leaveButton.setData(R.drawable.calls_decline, 0xffffffff, Theme.getColor(Theme.key_voipgroup_leaveButton), 0.3f, false, LocaleController.getString("VoipGroupLeave", R.string.VoipGroupLeave), false, false); buttonsContainer.addView(leaveButton, LayoutHelper.createFrame(68, 80)); leaveButton.setOnClickListener(v -> { + if (call == null || call.isScheduled()) { + dismiss(); + return; + } updateItems(); onLeaveClick(context, this::dismiss, false); }); @@ -2103,7 +2912,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter @Override public boolean onTouchEvent(MotionEvent event) { - if (event.getAction() == MotionEvent.ACTION_DOWN && muteButtonState == MUTE_BUTTON_STATE_UNMUTE) { + if (event.getAction() == MotionEvent.ACTION_DOWN && muteButtonState == MUTE_BUTTON_STATE_UNMUTE && call != null) { AndroidUtilities.runOnUIThread(pressRunnable, 300); scheduled = true; } else if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) { @@ -2154,61 +2963,95 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter @Override public void onClick(View v) { - if (VoIPService.getSharedInstance() == null || muteButtonState == MUTE_BUTTON_STATE_CONNECTING) { + if (call == null || muteButtonState == MUTE_BUTTON_STATE_CONNECTING) { return; } - if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND) { - if (playingHandAnimation) { + if (muteButtonState == MUTE_BUTTON_STATE_START_NOW) { + if (startingGroupCall) { return; } - playingHandAnimation = true; - AndroidUtilities.shakeView(muteLabel[0], 2, 0); - AndroidUtilities.shakeView(muteSubLabel[0], 2, 0); v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); - int num = Utilities.random.nextInt(100); - int endFrame; - int startFrame; - if (num < 32) { - startFrame = 0; - endFrame = 120; - } else if (num < 64) { - startFrame = 120; - endFrame = 240; - } else if (num < 97) { - startFrame = 240; - endFrame = 420; - } else if (num == 98) { - startFrame = 420; - endFrame = 540; - } else { - startFrame = 540; - endFrame = 720; - } - handDrawables.setCustomEndFrame(endFrame); - handDrawables.setOnFinishCallback(finishRunnable, endFrame - 1); - muteButton.setAnimation(handDrawables); - handDrawables.setCurrentFrame(startFrame); - muteButton.playAnimation(); - if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN) { - TLRPC.TL_groupCallParticipant participant = call.participants.get(MessageObject.getPeerId(selfPeer)); - TLObject object; - int peerId = MessageObject.getPeerId(participant.peer); - if (peerId > 0) { - object = accountInstance.getMessagesController().getUser(peerId); - } else { - object = accountInstance.getMessagesController().getChat(-peerId); + startingGroupCall = true; + TLRPC.TL_phone_startScheduledGroupCall req = new TLRPC.TL_phone_startScheduledGroupCall(); + req.call = call.getInputGroupCall(); + accountInstance.getConnectionsManager().sendRequest(req, (response, error) -> { + if (response != null) { + accountInstance.getMessagesController().processUpdates((TLRPC.Updates) response, false); + } + }); + } else if (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER || muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + if (reminderHintView != null) { + reminderHintView.hide(); } - VoIPService.getSharedInstance().editCallMember(object, true, -1, true); - updateMuteButton(MUTE_BUTTON_STATE_RAISED_HAND, true); } - } else if (muteButtonState == MUTE_BUTTON_STATE_UNMUTE) { - updateMuteButton(MUTE_BUTTON_STATE_MUTE, true); - VoIPService.getSharedInstance().setMicMute(false, false, true); - muteButton.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); + TLRPC.TL_phone_toggleGroupCallStartSubscription req = new TLRPC.TL_phone_toggleGroupCallStartSubscription(); + req.call = call.getInputGroupCall(); + call.call.schedule_start_subscribed = !call.call.schedule_start_subscribed; + req.subscribed = call.call.schedule_start_subscribed; + accountInstance.getConnectionsManager().sendRequest(req, (response, error) -> { + if (response != null) { + accountInstance.getMessagesController().processUpdates((TLRPC.Updates) response, false); + } + }); + updateMuteButton(call.call.schedule_start_subscribed ? MUTE_BUTTON_STATE_CANCEL_REMINDER : MUTE_BUTTON_STATE_SET_REMINDER, true); } else { - updateMuteButton(MUTE_BUTTON_STATE_UNMUTE, true); - VoIPService.getSharedInstance().setMicMute(true, false, true); - muteButton.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); + if (VoIPService.getSharedInstance() == null || isStillConnecting()) { + return; + } + if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND) { + if (playingHandAnimation) { + return; + } + playingHandAnimation = true; + AndroidUtilities.shakeView(muteLabel[0], 2, 0); + AndroidUtilities.shakeView(muteSubLabel[0], 2, 0); + v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); + int num = Utilities.random.nextInt(100); + int endFrame; + int startFrame; + if (num < 32) { + startFrame = 0; + endFrame = 120; + } else if (num < 64) { + startFrame = 120; + endFrame = 240; + } else if (num < 97) { + startFrame = 240; + endFrame = 420; + } else if (num == 98) { + startFrame = 420; + endFrame = 540; + } else { + startFrame = 540; + endFrame = 720; + } + handDrawables.setCustomEndFrame(endFrame); + handDrawables.setOnFinishCallback(finishRunnable, endFrame - 1); + muteButton.setAnimation(handDrawables); + handDrawables.setCurrentFrame(startFrame); + muteButton.playAnimation(); + if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN) { + TLRPC.TL_groupCallParticipant participant = call.participants.get(MessageObject.getPeerId(selfPeer)); + TLObject object; + int peerId = MessageObject.getPeerId(participant.peer); + if (peerId > 0) { + object = accountInstance.getMessagesController().getUser(peerId); + } else { + object = accountInstance.getMessagesController().getChat(-peerId); + } + VoIPService.getSharedInstance().editCallMember(object, true, -1, true); + updateMuteButton(MUTE_BUTTON_STATE_RAISED_HAND, true); + } + } else if (muteButtonState == MUTE_BUTTON_STATE_UNMUTE) { + updateMuteButton(MUTE_BUTTON_STATE_MUTE, true); + VoIPService.getSharedInstance().setMicMute(false, false, true); + muteButton.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); + } else { + updateMuteButton(MUTE_BUTTON_STATE_UNMUTE, true); + VoIPService.getSharedInstance().setMicMute(true, false, true); + muteButton.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); + } } } }); @@ -2237,223 +3080,6 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } } - actionBar = new ActionBar(context) { - @Override - public void setAlpha(float alpha) { - super.setAlpha(alpha); - containerView.invalidate(); - } - }; - actionBar.setBackButtonImage(R.drawable.ic_ab_back); - actionBar.setOccupyStatusBar(false); - actionBar.setAllowOverlayTitle(false); - actionBar.setItemsColor(Theme.getColor(Theme.key_voipgroup_actionBarItems), false); - actionBar.setItemsBackgroundColor(Theme.getColor(Theme.key_actionBarActionModeDefaultSelector), false); - actionBar.setTitleColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); - actionBar.setSubtitleColor(Theme.getColor(Theme.key_voipgroup_lastSeenTextUnscrolled)); - actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() { - @Override - public void onItemClick(int id) { - if (id == -1) { - dismiss(); - } else if (id == eveyone_can_speak_item) { - call.call.join_muted = false; - toggleAdminSpeak(); - } else if (id == admin_can_speak_item) { - call.call.join_muted = true; - toggleAdminSpeak(); - } else if (id == share_invite_link_item) { - getLink(false); - } else if (id == leave_item) { - AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); - - builder.setTitle(LocaleController.getString("VoipGroupEndAlertTitle", R.string.VoipGroupEndAlertTitle)); - builder.setMessage(LocaleController.getString("VoipGroupEndAlertText", R.string.VoipGroupEndAlertText)); - - builder.setPositiveButton(LocaleController.getString("VoipGroupEnd", R.string.VoipGroupEnd), (dialogInterface, i) -> { - if (VoIPService.getSharedInstance() != null) { - VoIPService.getSharedInstance().hangUp(1); - } - dismiss(); - NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.didStartedCall); - }); - builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); - AlertDialog dialog = builder.create(); - - dialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_dialogBackground)); - dialog.show(); - TextView button = (TextView) dialog.getButton(DialogInterface.BUTTON_POSITIVE); - if (button != null) { - button.setTextColor(Theme.getColor(Theme.key_voipgroup_leaveCallMenu)); - } - dialog.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); - } else if (id == start_record_item) { - AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); - - EditTextBoldCursor editText; - if (call.recording) { - builder.setTitle(LocaleController.getString("VoipGroupStopRecordingTitle", R.string.VoipGroupStopRecordingTitle)); - builder.setMessage(LocaleController.getString("VoipGroupStopRecordingText", R.string.VoipGroupStopRecordingText)); - editText = null; - } else { - enterEventSent = false; - builder.setTitle(LocaleController.getString("VoipGroupStartRecordingTitle", R.string.VoipGroupStartRecordingTitle)); - builder.setMessage(LocaleController.getString("VoipGroupStartRecordingText", R.string.VoipGroupStartRecordingText)); - builder.setCheckFocusable(false); - - editText = new EditTextBoldCursor(getContext()); - editText.setBackgroundDrawable(Theme.createEditTextDrawable(getContext(), true)); - - LinearLayout linearLayout = new LinearLayout(getContext()); - linearLayout.setOrientation(LinearLayout.VERTICAL); - builder.setView(linearLayout); - - editText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); - editText.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); - editText.setMaxLines(1); - editText.setLines(1); - editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); - editText.setGravity(Gravity.LEFT | Gravity.TOP); - editText.setSingleLine(true); - editText.setHint(LocaleController.getString("VoipGroupSaveFileHint", R.string.VoipGroupSaveFileHint)); - editText.setImeOptions(EditorInfo.IME_ACTION_DONE); - editText.setHintTextColor(Theme.getColor(Theme.key_voipgroup_lastSeenText)); - editText.setCursorColor(Theme.getColor(Theme.key_voipgroup_nameText)); - editText.setCursorSize(AndroidUtilities.dp(20)); - editText.setCursorWidth(1.5f); - editText.setPadding(0, AndroidUtilities.dp(4), 0, 0); - linearLayout.addView(editText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 36, Gravity.TOP | Gravity.LEFT, 24, 0, 24, 12)); - editText.setOnEditorActionListener((textView, i2, keyEvent) -> { - AndroidUtilities.hideKeyboard(textView); - builder.create().getButton(AlertDialog.BUTTON_POSITIVE).callOnClick(); - return false; - }); - - final AlertDialog alertDialog = builder.create(); - alertDialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_inviteMembersBackground)); - alertDialog.setOnShowListener(dialog -> makeFocusable(null, alertDialog, editText, true)); - alertDialog.setOnDismissListener(dialog -> AndroidUtilities.hideKeyboard(editText)); - } - - builder.setPositiveButton(call.recording ? LocaleController.getString("Stop", R.string.Stop) : LocaleController.getString("Start", R.string.Start), (dialogInterface, i) -> { - if (editText == null) { - call.toggleRecord(null); - getUndoView().showWithAction(0, UndoView.ACTION_VOIP_RECORDING_FINISHED, null); - } else { - call.toggleRecord(editText.getText().toString()); - AndroidUtilities.hideKeyboard(editText); - getUndoView().showWithAction(0, UndoView.ACTION_VOIP_RECORDING_STARTED, null); - if (VoIPService.getSharedInstance() != null) { - VoIPService.getSharedInstance().playStartRecordSound(); - } - } - }); - builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), (dialog, which) -> AndroidUtilities.hideKeyboard(editText)); - AlertDialog dialog = builder.create(); - dialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_dialogBackground)); - dialog.show(); - dialog.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); - if (editText != null) { - editText.requestFocus(); - } - } else if (id == permission_item) { - changingPermissions = true; - everyoneItem.setVisibility(View.VISIBLE); - adminItem.setVisibility(View.VISIBLE); - - accountGap.setVisibility(View.GONE); - inviteItem.setVisibility(View.GONE); - leaveItem.setVisibility(View.GONE); - permissionItem.setVisibility(View.GONE); - editTitleItem.setVisibility(View.GONE); - recordItem.setVisibility(View.GONE); - accountSelectCell.setVisibility(View.GONE); - otherItem.forceUpdatePopupPosition(); - } else if (id == edit_item) { - enterEventSent = false; - final EditTextBoldCursor editText = new EditTextBoldCursor(getContext()); - editText.setBackgroundDrawable(Theme.createEditTextDrawable(getContext(), true)); - - AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); - builder.setTitle(LocaleController.getString("VoipGroupTitle", R.string.VoipGroupTitle)); - builder.setCheckFocusable(false); - builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), (dialog, which) -> AndroidUtilities.hideKeyboard(editText)); - - LinearLayout linearLayout = new LinearLayout(getContext()); - linearLayout.setOrientation(LinearLayout.VERTICAL); - builder.setView(linearLayout); - - editText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); - editText.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); - editText.setMaxLines(1); - editText.setLines(1); - editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); - editText.setGravity(Gravity.LEFT | Gravity.TOP); - editText.setSingleLine(true); - editText.setImeOptions(EditorInfo.IME_ACTION_DONE); - editText.setHint(currentChat.title); - editText.setHintTextColor(Theme.getColor(Theme.key_voipgroup_lastSeenText)); - editText.setCursorColor(Theme.getColor(Theme.key_voipgroup_nameText)); - editText.setCursorSize(AndroidUtilities.dp(20)); - editText.setCursorWidth(1.5f); - editText.setPadding(0, AndroidUtilities.dp(4), 0, 0); - linearLayout.addView(editText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 36, Gravity.TOP | Gravity.LEFT, 24, 6, 24, 0)); - editText.setOnEditorActionListener((textView, i, keyEvent) -> { - AndroidUtilities.hideKeyboard(textView); - builder.create().getButton(AlertDialog.BUTTON_POSITIVE).callOnClick(); - return false; - }); - editText.addTextChangedListener(new TextWatcher() { - - boolean ignoreTextChange; - - @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) { - - } - - @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - - } - - @Override - public void afterTextChanged(Editable s) { - if (ignoreTextChange) { - return; - } - if (s.length() > 40) { - ignoreTextChange = true; - s.delete(40, s.length()); - AndroidUtilities.shakeView(editText, 2, 0); - editText.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); - ignoreTextChange = false; - } - } - }); - if (!TextUtils.isEmpty(call.call.title)) { - editText.setText(call.call.title); - editText.setSelection(editText.length()); - } - builder.setPositiveButton(LocaleController.getString("Save", R.string.Save), (dialog, which) -> { - AndroidUtilities.hideKeyboard(editText); - call.setTitle(editText.getText().toString()); - builder.getDismissRunnable().run(); - }); - - final AlertDialog alertDialog = builder.create(); - alertDialog.setBackgroundColor(Theme.getColor(Theme.key_voipgroup_inviteMembersBackground)); - alertDialog.setOnShowListener(dialog -> makeFocusable(null, alertDialog, editText, true)); - alertDialog.setOnDismissListener(dialog -> AndroidUtilities.hideKeyboard(editText)); - alertDialog.show(); - alertDialog.setTextColor(Theme.getColor(Theme.key_voipgroup_nameText)); - editText.requestFocus(); - } else if (id == user_item) { - accountSwitchImageView.callOnClick(); - } - } - }); - actionBar.setAlpha(0.0f); actionBar.getBackButton().setScaleX(0.9f); actionBar.getBackButton().setScaleY(0.9f); @@ -2466,18 +3092,54 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter accountSwitchAvatarDrawable.setTextSize(AndroidUtilities.dp(12)); accountSwitchImageView = new BackupImageView(context); accountSwitchImageView.setRoundRadius(AndroidUtilities.dp(16)); - accountSwitchImageView.setOnClickListener(v -> JoinCallAlert.open(getContext(), -chat.id, accountInstance, null, JoinCallAlert.TYPE_DISPLAY, (peer1, hasFewPeers) -> { - if (VoIPService.getSharedInstance() == null || !hasFewPeers) { + accountSwitchImageView.setOnClickListener(v -> JoinCallAlert.open(getContext(), -currentChat.id, accountInstance, null, JoinCallAlert.TYPE_DISPLAY, selfPeer, (peer1, hasFewPeers, schedule) -> { + if (call == null) { return; } - TLRPC.TL_groupCallParticipant participant = call.participants.get(MessageObject.getPeerId(selfPeer)); - VoIPService.getSharedInstance().setGroupCallPeer(peer1); + TLObject object; if (peer1 instanceof TLRPC.TL_inputPeerUser) { - userSwitchObject = accountInstance.getMessagesController().getUser(peer1.user_id); + object = accountInstance.getMessagesController().getUser(peer1.user_id); } else if (peer1 instanceof TLRPC.TL_inputPeerChat) { - userSwitchObject = accountInstance.getMessagesController().getChat(peer1.chat_id); + object = accountInstance.getMessagesController().getChat(peer1.chat_id); } else { - userSwitchObject = accountInstance.getMessagesController().getChat(peer1.channel_id); + object = accountInstance.getMessagesController().getChat(peer1.channel_id); + } + if (call.isScheduled()) { + getUndoView().showWithAction(0, UndoView.ACTION_VOIP_USER_CHANGED, object); + if (peer1 instanceof TLRPC.TL_inputPeerChannel) { + selfPeer = new TLRPC.TL_peerChannel(); + selfPeer.channel_id = peer1.channel_id; + } else if (peer1 instanceof TLRPC.TL_inputPeerUser) { + selfPeer = new TLRPC.TL_peerUser(); + selfPeer.user_id = peer1.user_id; + } else if (peer1 instanceof TLRPC.TL_inputPeerChat) { + selfPeer = new TLRPC.TL_peerChat(); + selfPeer.chat_id = peer1.chat_id; + } + this.schedulePeer = peer1; + TLRPC.ChatFull chatFull = accountInstance.getMessagesController().getChatFull(currentChat.id); + if (chatFull != null) { + chatFull.groupcall_default_join_as = selfPeer; + if (chatFull instanceof TLRPC.TL_chatFull) { + chatFull.flags |= 32768; + } else { + chatFull.flags |= 67108864; + } + } + TLRPC.TL_phone_saveDefaultGroupCallJoinAs req = new TLRPC.TL_phone_saveDefaultGroupCallJoinAs(); + req.peer = MessagesController.getInputPeer(currentChat); + req.join_as = peer1; + accountInstance.getConnectionsManager().sendRequest(req, (response, error) -> { + + }); + updateItems(); + } else { + if (VoIPService.getSharedInstance() == null || !hasFewPeers) { + return; + } + TLRPC.TL_groupCallParticipant participant = call.participants.get(MessageObject.getPeerId(selfPeer)); + VoIPService.getSharedInstance().setGroupCallPeer(peer1); + userSwitchObject = object; } })); @@ -2489,6 +3151,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter otherItem.setDelegate(id -> actionBar.getActionBarMenuOnItemClick().onItemClick(id)); otherItem.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_voipgroup_actionBarItemsSelector), 6)); otherItem.setOnClickListener(v -> { + if (call == null) { + return; + } if (call.call.join_muted) { everyoneItem.setColors(Theme.getColor(Theme.key_voipgroup_actionBarItems), Theme.getColor(Theme.key_voipgroup_actionBarItems)); everyoneItem.setChecked(false); @@ -2534,7 +3199,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter textView.setSingleLine(true); textView.setEllipsize(TextUtils.TruncateAt.END); textView.setOnClickListener(v -> { - if (call.recording) { + if (call != null && call.recording) { showRecordHint(textView); } }); @@ -2606,31 +3271,38 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter permissionItem.setColors(Theme.getColor(Theme.key_voipgroup_actionBarItems), Theme.getColor(Theme.key_voipgroup_actionBarItems)); recordItem.setColors(Theme.getColor(Theme.key_voipgroup_actionBarItems), Theme.getColor(Theme.key_voipgroup_actionBarItems)); + if (call != null) { + initCreatedGroupCall(); + } + listAdapter.notifyDataSetChanged(); oldCount = listAdapter.getItemCount(); - actionBar.setSubtitle(LocaleController.formatPluralString("Participants", call.call.participants_count + (listAdapter.addSelfToCounter() ? 1 : 0))); - actionBar.setTitleRightMargin(AndroidUtilities.dp(48) * 2); - - call.saveActiveDates(); - VoIPService.getSharedInstance().registerStateListener(this); updateItems(); updateSpeakerPhoneIcon(false); updateState(false, false); + updateScheduleUI(false); setColorProgress(0.0f); leaveBackgroundPaint.setColor(Theme.getColor(Theme.key_voipgroup_leaveButton)); updateTitle(false); actionBar.getTitleTextView().setOnClickListener(v -> { - if (call.recording) { + if (call != null && call.recording) { showRecordHint(actionBar.getTitleTextView()); } }); avatarPagerIndicator = new AvatarPreviewPagerIndicator(context); - avatarsViewPager = new ProfileGalleryView(context, actionBar, listView, avatarPagerIndicator); + avatarsViewPager = new ProfileGalleryView(context, actionBar, listView, avatarPagerIndicator) { + @Override + public void invalidate() { + super.invalidate(); + containerView.invalidate(); + } + }; + avatarsViewPager.setInvalidateWithParent(true); avatarPagerIndicator.setProfileGalleryView(avatarsViewPager); avatarPreviewContainer = new FrameLayout(context) { @@ -2661,8 +3333,8 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter scrimView.getAvatarImageView().setRoundRadius(scrimView.getAvatarImageView().getMeasuredHeight() / 2); canvas.restore(); } - avatarsViewPager.setAlpha(progressToAvatarPreview); } + avatarsViewPager.setAlpha(progressToAvatarPreview); path.reset(); rectF.set(0, 0, getMeasuredHeight(), getMeasuredWidth()); @@ -2672,6 +3344,12 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter super.dispatchDraw(canvas); canvas.restore(); } + + @Override + public void invalidate() { + super.invalidate(); + containerView.invalidate(); + } }; avatarPreviewContainer.setVisibility(View.GONE); @@ -2695,12 +3373,193 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } }); - blurredView = new View(context); + blurredView = new View(context) { + @Override + public void setAlpha(float alpha) { + if (getAlpha() != alpha) { + super.setAlpha(alpha); + checkContentOverlayed(); + } + } + }; containerView.addView(blurredView); avatarPreviewContainer.addView(avatarsViewPager, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); avatarPreviewContainer.addView(avatarPagerIndicator, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, 0, 0, 0, 0, 0)); containerView.addView(avatarPreviewContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, 0, 14, 14, 14, 14)); + + ViewGroup decorView; + if (Build.VERSION.SDK_INT >= 21) { + decorView = (ViewGroup) getWindow().getDecorView(); + } else { + decorView = containerView; + } + pinchToZoomHelper = new PinchToZoomHelper(decorView) { + @Override + protected void invalidateViews() { + super.invalidateViews(); + for (int i = 0; i < avatarsViewPager.getChildCount(); i++) { + avatarsViewPager.getChildAt(i).invalidate(); + } + } + + @Override + protected void drawOverlays(Canvas canvas, float alpha, float parentOffsetX, float parentOffsetY, float clipTop, float clipBottom) { + if (alpha > 0) { + float x = avatarPreviewContainer.getX() + containerView.getX(); + float y = avatarPreviewContainer.getY() + containerView.getY(); + AndroidUtilities.rectTmp.set(x, y, x + avatarsViewPager.getMeasuredWidth(), y + avatarsViewPager.getMeasuredHeight()); + canvas.saveLayerAlpha(AndroidUtilities.rectTmp, (int) (255 * alpha), Canvas.ALL_SAVE_FLAG); + + canvas.translate(x, y); + avatarPreviewContainer.draw(canvas); + + canvas.restore(); + } + } + }; + pinchToZoomHelper.setCallback(new PinchToZoomHelper.Callback() { + + @Override + public void onZoomStarted(MessageObject messageObject) { + listView.cancelClickRunnables(true); + pinchToZoomHelper.getPhotoImage().setRoundRadius(AndroidUtilities.dp(13), AndroidUtilities.dp(13), 0, 0); + containerView.invalidate(); + } + + @Override + public void onZoomFinished(MessageObject messageObject) { + containerView.invalidate(); + } + }); + avatarsViewPager.setPinchToZoomHelper(pinchToZoomHelper); + } + + private void checkContentOverlayed() { + boolean overlayed = !avatarPriviewTransitionInProgress && blurredView.getVisibility() == View.VISIBLE && blurredView.getAlpha() == 1f;; + if (contentFullyOverlayed != overlayed) { + contentFullyOverlayed = overlayed; + buttonsContainer.invalidate(); + containerView.invalidate(); + listView.invalidate(); + } + }; + + private void updateScheduleUI(boolean animation) { + if ((scheduleTimerContainer == null || call != null) && scheduleAnimator == null) { + scheduleButtonsScale = 1.0f; + switchToButtonInt2 = 1.0f; + switchToButtonProgress = 1.0f; + if (scheduleTimerContainer == null) { + return; + } + } + if (!animation) { + AndroidUtilities.cancelRunOnUIThread(updateSchedeulRunnable); + updateSchedeulRunnable.run(); + if (call == null || call.isScheduled()) { + listView.setVisibility(View.INVISIBLE); + } else { + listView.setVisibility(View.VISIBLE); + } + leaveItem.setText(LocaleController.getString("VoipGroupCancelChat", R.string.VoipGroupCancelChat)); + } + float scheduleButtonsScale2; + float alpha; + if (switchToButtonProgress > 0.6f) { + scheduleButtonsScale = scheduleButtonsScale2 = 1.05f - CubicBezierInterpolator.DEFAULT.getInterpolation((switchToButtonProgress - 0.6f) / 0.4f) * 0.05f; + switchToButtonInt2 = 1.0f; + alpha = 1.0f; + } else { + scheduleButtonsScale = 1.0f + CubicBezierInterpolator.DEFAULT.getInterpolation(switchToButtonProgress / 0.6f) * 0.05f; + switchToButtonInt2 = CubicBezierInterpolator.DEFAULT.getInterpolation(switchToButtonProgress / 0.6f); + scheduleButtonsScale2 = 1.05f * CubicBezierInterpolator.DEFAULT.getInterpolation(switchToButtonProgress / 0.6f); + alpha = switchToButtonProgress / 0.6f; + } + + float reversedAlpha = 1.0f - alpha; + leaveButton.setAlpha(alpha); + soundButton.setAlpha(alpha * (soundButton.isEnabled() ? 1.0f : 0.5f)); + muteButton.setAlpha(alpha); + scheduleTimerContainer.setAlpha(reversedAlpha); + scheduleStartInTextView.setAlpha(alpha); + scheduleStartAtTextView.setAlpha(alpha); + scheduleTimeTextView.setAlpha(alpha); + muteLabel[0].setAlpha(alpha); + muteSubLabel[0].setAlpha(alpha); + scheduleTimeTextView.setScaleX(scheduleButtonsScale2); + scheduleTimeTextView.setScaleY(scheduleButtonsScale2); + leaveButton.setScaleX(scheduleButtonsScale2); + leaveButton.setScaleY(scheduleButtonsScale2); + soundButton.setScaleX(scheduleButtonsScale2); + soundButton.setScaleY(scheduleButtonsScale2); + muteButton.setScaleX(scheduleButtonsScale2); + muteButton.setScaleY(scheduleButtonsScale2); + scheduleButtonTextView.setScaleX(reversedAlpha); + scheduleButtonTextView.setScaleY(reversedAlpha); + scheduleButtonTextView.setAlpha(reversedAlpha); + scheduleInfoTextView.setAlpha(reversedAlpha); + otherItem.setAlpha(alpha); + int newVisibility = reversedAlpha == 0.0f ? View.INVISIBLE : View.VISIBLE; + if (newVisibility != scheduleTimerContainer.getVisibility()) { + scheduleTimerContainer.setVisibility(newVisibility); + scheduleButtonTextView.setVisibility(newVisibility); + } + } + + private void initCreatedGroupCall() { + if (callInitied) { + return; + } + VoIPService service = VoIPService.getSharedInstance(); + if (service == null) { + return; + } + callInitied = true; + oldParticipants.addAll(call.sortedParticipants); + oldInvited.addAll(call.invitedUsers); + currentCallState = service.getCallState(); + if (call == null) { + call = service.groupCall; + } + actionBar.setSubtitle(LocaleController.formatPluralString("Participants", call.call.participants_count + (listAdapter.addSelfToCounter() ? 1 : 0))); + actionBar.setTitleRightMargin(AndroidUtilities.dp(48) * 2); + call.saveActiveDates(); + VoIPService.getSharedInstance().registerStateListener(this); + if (scheduleTimeTextView != null && scheduleTimeTextView.getVisibility() == View.VISIBLE) { + leaveButton.setData(R.drawable.calls_decline, 0xffffffff, Theme.getColor(Theme.key_voipgroup_leaveButton), 0.3f, false, LocaleController.getString("VoipGroupLeave", R.string.VoipGroupLeave), false, true); + updateSpeakerPhoneIcon(true); + leaveItem.setText(LocaleController.getString("VoipGroupEndChat", R.string.VoipGroupEndChat)); + listView.setVisibility(View.VISIBLE); + pipItem.setVisibility(View.VISIBLE); + AnimatorSet animatorSet = new AnimatorSet(); + animatorSet.playTogether( + ObjectAnimator.ofFloat(listView, View.ALPHA, 0.0f, 1.0f), + ObjectAnimator.ofFloat(listView, View.TRANSLATION_Y, AndroidUtilities.dp(200), 0.0f), + ObjectAnimator.ofFloat(scheduleTimeTextView, View.SCALE_X, 0.0f), + ObjectAnimator.ofFloat(scheduleTimeTextView, View.SCALE_Y, 0.0f), + ObjectAnimator.ofFloat(scheduleTimeTextView, View.ALPHA, 0.0f), + ObjectAnimator.ofFloat(scheduleStartInTextView, View.SCALE_X, 0.0f), + ObjectAnimator.ofFloat(scheduleStartInTextView, View.SCALE_Y, 0.0f), + ObjectAnimator.ofFloat(scheduleStartInTextView, View.ALPHA, 0.0f), + ObjectAnimator.ofFloat(scheduleStartAtTextView, View.SCALE_X, 0.0f), + ObjectAnimator.ofFloat(scheduleStartAtTextView, View.SCALE_Y, 0.0f), + ObjectAnimator.ofFloat(scheduleStartAtTextView, View.ALPHA, 0.0f), + ObjectAnimator.ofFloat(pipItem, View.SCALE_X, 0.0f, 1.0f), + ObjectAnimator.ofFloat(pipItem, View.SCALE_Y, 0.0f, 1.0f), + ObjectAnimator.ofFloat(pipItem, View.ALPHA, 0.0f, 1.0f)); + animatorSet.setInterpolator(CubicBezierInterpolator.EASE_OUT); + animatorSet.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + scheduleTimeTextView.setVisibility(View.INVISIBLE); + scheduleStartAtTextView.setVisibility(View.INVISIBLE); + scheduleStartInTextView.setVisibility(View.INVISIBLE); + } + }); + animatorSet.setDuration(300); + animatorSet.start(); + } } @Override @@ -2748,11 +3607,19 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void updateTitle(boolean animated) { + if (call == null) { + titleTextView.setText(LocaleController.getString("VoipGroupScheduleVoiceChat", R.string.VoipGroupScheduleVoiceChat), animated); + return; + } if (!TextUtils.isEmpty(call.call.title)) { if (!call.call.title.equals(actionBar.getTitle())) { if (animated) { actionBar.setTitleAnimated(call.call.title, true, 180); - actionBar.getTitleTextView().setOnClickListener(v -> showRecordHint(actionBar.getTitleTextView())); + actionBar.getTitleTextView().setOnClickListener(v -> { + if (call != null && call.recording) { + showRecordHint(actionBar.getTitleTextView()); + } + }); } else { actionBar.setTitle(call.call.title); } @@ -2762,7 +3629,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (!currentChat.title.equals(actionBar.getTitle())) { if (animated) { actionBar.setTitleAnimated(currentChat.title, true, 180); - actionBar.getTitleTextView().setOnClickListener(v -> showRecordHint(actionBar.getTitleTextView())); + actionBar.getTitleTextView().setOnClickListener(v -> { + if (call != null && call.recording) { + showRecordHint(actionBar.getTitleTextView()); + } + }); } else { actionBar.setTitle(currentChat.title); } @@ -2799,7 +3670,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter listViewBackgroundPaint.setColor(color); listView.setGlowColor(color); - if (muteButtonState == MUTE_BUTTON_STATE_CONNECTING || muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND) { + if (muteButtonState == MUTE_BUTTON_STATE_CONNECTING || isGradientState(muteButtonState)) { muteButton.invalidate(); } @@ -2855,6 +3726,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter openShareAlert(true, null, url, copy); } } else { + if (call == null) { + return; + } for (int a = 0; a < 2; a++) { int num = a; TLRPC.TL_phone_exportGroupCallInvite req = new TLRPC.TL_phone_exportGroupCallInvite(); @@ -2877,7 +3751,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (ChatObject.canManageCalls(currentChat) && !call.call.join_muted) { invites[0] = null; } - openShareAlert(false, invites[0], invites[1], copy); + if (invites[0] == null && invites[1] == null && !TextUtils.isEmpty(currentChat.username)) { + openShareAlert(true, null, accountInstance.getMessagesController().linkPrefix + "/" + currentChat.username, copy); + } else { + openShareAlert(false, invites[0], invites[1], copy); + } })); } } @@ -2935,6 +3813,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void inviteUserToCall(int id, boolean shouldAdd) { + if (call == null) { + return; + } TLRPC.User user = accountInstance.getMessagesController().getUser(id); if (user == null) { return; @@ -2994,18 +3875,14 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void updateLayout(boolean animated) { - if (listView.getChildCount() <= 0) { - listView.setTopGlowOffset((int) (scrollOffsetY = listView.getPaddingTop())); - containerView.invalidate(); - return; - } float minY = Integer.MAX_VALUE; - for (int a = 0, N = listView.getChildCount(); a < N; a++) { + int N = listView.getChildCount(); + for (int a = 0; a < N; a++) { View child = listView.getChildAt(a); minY = Math.min(minY, itemAnimator.getTargetY(child)); } if (minY < 0 || minY == Integer.MAX_VALUE) { - minY = 0; + minY = N != 0 ? 0 : listView.getPaddingTop(); } boolean show = minY <= ActionBar.getCurrentActionBarHeight() - AndroidUtilities.dp(14); @@ -3083,6 +3960,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter menuItemsContainer.setTranslationY(Math.max(AndroidUtilities.dp(4), scrollOffsetY - AndroidUtilities.dp(53) - diff)); titleTextView.setTranslationY(Math.max(AndroidUtilities.dp(4), scrollOffsetY - AndroidUtilities.dp(44) - diff)); + if (scheduleTimerContainer != null) { + scheduleTimerContainer.setTranslationY(Math.max(AndroidUtilities.dp(4), scrollOffsetY - AndroidUtilities.dp(44) - diff)); + } containerView.invalidate(); } } @@ -3101,11 +3981,23 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void updateState(boolean animated, boolean selfUpdated) { + if (call == null || call.isScheduled()) { + int state; + if (ChatObject.canManageCalls(currentChat)) { + state = MUTE_BUTTON_STATE_START_NOW; + } else { + state = call.call.schedule_start_subscribed ? MUTE_BUTTON_STATE_CANCEL_REMINDER : MUTE_BUTTON_STATE_SET_REMINDER; + } + updateMuteButton(state, animated); + leaveButton.setData(R.drawable.calls_decline, 0xffffffff, Theme.getColor(Theme.key_voipgroup_leaveButton), 0.3f, false, LocaleController.getString("Close", R.string.Close), false, false); + updateScheduleUI(false); + return; + } VoIPService voIPService = VoIPService.getSharedInstance(); if (voIPService == null) { return; } - if (!voIPService.isSwitchingStream() && (currentCallState == VoIPService.STATE_WAIT_INIT || currentCallState == VoIPService.STATE_WAIT_INIT_ACK || currentCallState == VoIPService.STATE_CREATING || currentCallState == VoIPService.STATE_RECONNECTING)) { + if (!voIPService.isSwitchingStream() && (creatingServiceTime == 0 || Math.abs(SystemClock.elapsedRealtime() - creatingServiceTime) > 3000) && (currentCallState == VoIPService.STATE_WAIT_INIT || currentCallState == VoIPService.STATE_WAIT_INIT_ACK || currentCallState == VoIPService.STATE_CREATING || currentCallState == VoIPService.STATE_RECONNECTING)) { cancelMutePress(); updateMuteButton(MUTE_BUTTON_STATE_CONNECTING, animated); } else { @@ -3155,7 +4047,12 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } VoIPService service = VoIPService.getSharedInstance(); if (service == null) { + soundButton.setData(R.drawable.msg_voiceshare, Color.WHITE, 0, 0.3f, true, LocaleController.getString("VoipChatShare", R.string.VoipChatShare), false, animated); + soundButton.setEnabled(!TextUtils.isEmpty(currentChat.username) || ChatObject.hasAdminRights(currentChat) && ChatObject.canAddUsers(currentChat), false); + soundButton.setChecked(true, false); return; + } else { + soundButton.setEnabled(true, animated); } boolean bluetooth = service.isBluetoothOn() || service.isBluetoothWillOn(); @@ -3189,24 +4086,71 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter boolean changed; boolean mutedByAdmin = false; - if (state == MUTE_BUTTON_STATE_UNMUTE) { + if (state == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + newText = LocaleController.getString("VoipGroupCancelReminder", R.string.VoipGroupCancelReminder); + newSubtext = ""; + changed = bigMicDrawable.setCustomEndFrame(202); + } else if (state == MUTE_BUTTON_STATE_SET_REMINDER) { + newText = LocaleController.getString("VoipGroupSetReminder", R.string.VoipGroupSetReminder); + newSubtext = ""; + changed = bigMicDrawable.setCustomEndFrame(344); + } else if (state == MUTE_BUTTON_STATE_START_NOW) { + newText = LocaleController.getString("VoipGroupStartNow", R.string.VoipGroupStartNow); + newSubtext = ""; + changed = bigMicDrawable.setCustomEndFrame(377); + } else if (state == MUTE_BUTTON_STATE_UNMUTE) { newText = LocaleController.getString("VoipGroupUnmute", R.string.VoipGroupUnmute); newSubtext = LocaleController.getString("VoipHoldAndTalk", R.string.VoipHoldAndTalk); - changed = bigMicDrawable.setCustomEndFrame(muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN ? 21 : 64); + if (muteButtonState == MUTE_BUTTON_STATE_CONNECTING) { + int endFrame = bigMicDrawable.getCustomEndFrame(); + if (endFrame == 136 || endFrame == 173 || endFrame == 274 || endFrame == 311) { + changed = bigMicDrawable.setCustomEndFrame(99); + } else { + changed = false; + } + } else if (muteButtonState == MUTE_BUTTON_STATE_START_NOW) { + changed = bigMicDrawable.setCustomEndFrame(404); + } else if (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + changed = bigMicDrawable.setCustomEndFrame(376); + } else if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + changed = bigMicDrawable.setCustomEndFrame(237); + } else if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN) { + changed = bigMicDrawable.setCustomEndFrame(36); + } else { + changed = bigMicDrawable.setCustomEndFrame(99); + } } else if (state == MUTE_BUTTON_STATE_MUTE) { newText = LocaleController.getString("VoipTapToMute", R.string.VoipTapToMute); newSubtext = ""; - changed = bigMicDrawable.setCustomEndFrame(muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND ? 64 : 42); + changed = bigMicDrawable.setCustomEndFrame(muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND ? 99 : 69); } else if (state == MUTE_BUTTON_STATE_RAISED_HAND) { newText = LocaleController.getString("VoipMutedTapedForSpeak", R.string.VoipMutedTapedForSpeak); newSubtext = LocaleController.getString("VoipMutedTapedForSpeakInfo", R.string.VoipMutedTapedForSpeakInfo); - changed = bigMicDrawable.setCustomEndFrame(84); + changed = bigMicDrawable.setCustomEndFrame(136); } else { TLRPC.TL_groupCallParticipant participant = call.participants.get(MessageObject.getPeerId(selfPeer)); if (mutedByAdmin = participant != null && !participant.can_self_unmute && participant.muted && !ChatObject.canManageCalls(currentChat)) { - changed = bigMicDrawable.setCustomEndFrame(84); + if (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + changed = bigMicDrawable.setCustomEndFrame(311); + } else if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + changed = bigMicDrawable.setCustomEndFrame(274); + } else if (muteButtonState == MUTE_BUTTON_STATE_MUTE) { + changed = bigMicDrawable.setCustomEndFrame(173); + } else { + changed = bigMicDrawable.setCustomEndFrame(136); + } } else { - changed = bigMicDrawable.setCustomEndFrame(muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND ? 21 : 64); + if (muteButtonState == MUTE_BUTTON_STATE_START_NOW) { + changed = bigMicDrawable.setCustomEndFrame(404); + } else if (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + changed = bigMicDrawable.setCustomEndFrame(376); + } else if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + changed = bigMicDrawable.setCustomEndFrame(237); + } else if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND) { + changed = bigMicDrawable.setCustomEndFrame(36); + } else { + changed = bigMicDrawable.setCustomEndFrame(99); + } } if (state == MUTE_BUTTON_STATE_CONNECTING) { newText = LocaleController.getString("Connecting", R.string.Connecting); @@ -3227,17 +4171,51 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (animated) { if (changed) { - if (state == MUTE_BUTTON_STATE_UNMUTE) { - bigMicDrawable.setCurrentFrame(muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN ? 0 : 42); + if (state == MUTE_BUTTON_STATE_START_NOW) { + bigMicDrawable.setCurrentFrame(376); + } else if (state == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + bigMicDrawable.setCurrentFrame(173); + } else if (state == MUTE_BUTTON_STATE_SET_REMINDER) { + bigMicDrawable.setCurrentFrame(311); + } else if (state == MUTE_BUTTON_STATE_UNMUTE) { + if (muteButtonState == MUTE_BUTTON_STATE_START_NOW) { + bigMicDrawable.setCurrentFrame(376); + } else if (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + bigMicDrawable.setCurrentFrame(344); + } else if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + bigMicDrawable.setCurrentFrame(202); + } else if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN) { + bigMicDrawable.setCurrentFrame(0); + } else { + bigMicDrawable.setCurrentFrame(69); + } } else if (state == MUTE_BUTTON_STATE_MUTE) { - bigMicDrawable.setCurrentFrame(muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND ? 42 : 21); + bigMicDrawable.setCurrentFrame(muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND ? 69 : 36); } else if (state == MUTE_BUTTON_STATE_RAISED_HAND) { - bigMicDrawable.setCurrentFrame(63); + bigMicDrawable.setCurrentFrame(99); } else { if (mutedByAdmin) { - bigMicDrawable.setCurrentFrame(63); + if (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + bigMicDrawable.setCurrentFrame(274); + } else if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + bigMicDrawable.setCurrentFrame(237); + } else if (muteButtonState == MUTE_BUTTON_STATE_MUTE) { + bigMicDrawable.setCurrentFrame(136); + } else { + bigMicDrawable.setCurrentFrame(99); + } } else { - bigMicDrawable.setCurrentFrame(muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND ? 0 : 42); + if (muteButtonState == MUTE_BUTTON_STATE_START_NOW) { + bigMicDrawable.setCurrentFrame(376); + } else if (muteButtonState == MUTE_BUTTON_STATE_CANCEL_REMINDER) { + bigMicDrawable.setCurrentFrame(344); + } else if (muteButtonState == MUTE_BUTTON_STATE_SET_REMINDER) { + bigMicDrawable.setCurrentFrame(202); + } else if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND) { + bigMicDrawable.setCurrentFrame(0); + } else { + bigMicDrawable.setCurrentFrame(69); + } } } } @@ -3302,7 +4280,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter colorsToSet[0] = Theme.getColor(Theme.key_voipgroup_muteButton2); colorsToSet[1] = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_soundButtonActive2), Theme.getColor(Theme.key_voipgroup_soundButtonActive2Scrolled), colorProgress, 1.0f); colorsToSet[2] = Theme.getColor(Theme.key_voipgroup_soundButton2); - } else if (state == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || state == MUTE_BUTTON_STATE_RAISED_HAND) { + } else if (isGradientState(state)) { colorsToSet[0] = Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient3); colorsToSet[1] = Theme.getColor(Theme.key_voipgroup_mutedByAdminMuteButton); colorsToSet[2] = Theme.getColor(Theme.key_voipgroup_mutedByAdminMuteButtonDisabled); @@ -3327,6 +4305,25 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter recordHintView.showForView(view, true); } + private void showReminderHint() { + SharedPreferences preferences = MessagesController.getGlobalMainSettings(); + if (preferences.getBoolean("reminderhint", false)) { + return; + } + preferences.edit().putBoolean("reminderhint", true).commit(); + if (reminderHintView == null) { + reminderHintView = new HintView(getContext(), 8); + reminderHintView.setAlpha(0.0f); + reminderHintView.setVisibility(View.INVISIBLE); + reminderHintView.setShowingDuration(4000); + containerView.addView(reminderHintView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 19, 0, 19, 0)); + reminderHintView.setText(LocaleController.getString("VoipChatReminderHint", R.string.VoipChatReminderHint)); + reminderHintView.setBackgroundColor(0xea272f38, 0xffffffff); + } + reminderHintView.setExtraTranslationY(-AndroidUtilities.statusBarHeight); + reminderHintView.showForView(muteButton, true); + } + private void updateMuteButtonState(boolean animated) { muteButton.invalidate(); @@ -3335,7 +4332,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter if (muteButtonState == MUTE_BUTTON_STATE_CONNECTING) { states[muteButtonState].shader = null; } else { - if (muteButtonState == MUTE_BUTTON_STATE_MUTED_BY_ADMIN || muteButtonState == MUTE_BUTTON_STATE_RAISED_HAND) { + if (isGradientState(muteButtonState)) { states[muteButtonState].shader = new LinearGradient(0, 400, 400, 0, new int[]{Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient), Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient3), Theme.getColor(Theme.key_voipgroup_mutedByAdminGradient2)}, null, Shader.TileMode.CLAMP); } else if (muteButtonState == MUTE_BUTTON_STATE_MUTE) { states[muteButtonState].shader = new RadialGradient(200, 200, 200, new int[]{Theme.getColor(Theme.key_voipgroup_muteButton), Theme.getColor(Theme.key_voipgroup_muteButton3)}, null, Shader.TileMode.CLAMP); @@ -3433,7 +4430,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter builder.setCustomViewOffset(12); builder.setView(linearLayout); - + builder.setDialogButtonColorKey(Theme.key_voipgroup_listeningText); builder.setPositiveButton(LocaleController.getString("VoipGroupLeave", R.string.VoipGroupLeave), (dialogInterface, position) -> processOnLeave(call, cells[0].isChecked(), selfId, onLeave)); builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); if (fromOverlayWindow) { @@ -3489,6 +4486,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter return; } AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + builder.setDialogButtonColorKey(Theme.key_voipgroup_listeningText); TextView messageTextView = new TextView(getContext()); messageTextView.setTextColor(Theme.getColor(Theme.key_voipgroup_actionBarItems)); @@ -3509,11 +4507,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter String name; if (object instanceof TLRPC.User) { TLRPC.User user = (TLRPC.User) object; - imageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); name = UserObject.getFirstName(user); } else { TLRPC.Chat chat = (TLRPC.Chat) object; - imageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + imageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); name = chat.title; } @@ -3594,6 +4592,25 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } else if (option == 7) { voIPService.editCallMember(object, true, -1, false); updateMuteButton(MUTE_BUTTON_STATE_MUTED_BY_ADMIN, true); + } else if (option == 9) { + if (currentAvatarUpdater != null && currentAvatarUpdater.isUploadingImage()) { + return; + } + currentAvatarUpdater = new ImageUpdater(true); + currentAvatarUpdater.setOpenWithFrontfaceCamera(true); + currentAvatarUpdater.setForceDarkTheme(true); + currentAvatarUpdater.setSearchAvailable(false, true); + currentAvatarUpdater.parentFragment = parentActivity.getActionBarLayout().getLastFragment(); + currentAvatarUpdater.setDelegate(avatarUpdaterDelegate = new AvatarUpdaterDelegate(peerId)); + + TLRPC.User user = accountInstance.getUserConfig().getCurrentUser(); + currentAvatarUpdater.openMenu(user.photo != null && user.photo.photo_big != null && !(user.photo instanceof TLRPC.TL_userProfilePhotoEmpty), () -> accountInstance.getMessagesController().deleteUserPhoto(null), dialog -> { + + }); + } else if (option == 10) { + AlertsCreator.createChangeBioAlert(participant.about, peerId, getContext(), currentAccount); + } else if (option == 11) { + AlertsCreator.createChangeNameAlert(peerId, getContext(), currentAccount); } else { if (option == 5) { voIPService.editCallMember(object, true, -1, null); @@ -3666,7 +4683,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter LinearLayout buttonsLayout = new LinearLayout(getContext()); LinearLayout volumeLayout = !participant.muted_by_you ? new LinearLayout(getContext()) : null; - + currentOptionsLayout = buttonsLayout; LinearLayout linearLayout = new LinearLayout(getContext()) { @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { @@ -3685,7 +4702,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter VolumeSlider volumeSlider = null; int color = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_listViewBackgroundUnscrolled), Theme.getColor(Theme.key_voipgroup_listViewBackground), colorProgress, 1.0f); - if (!participant.muted_by_you && (!participant.muted || participant.can_self_unmute)) { + if (volumeLayout != null && !view.isSelfUser() && !participant.muted_by_you && (!participant.muted || participant.can_self_unmute)) { Drawable shadowDrawable = getContext().getResources().getDrawable(R.drawable.popup_fixed_alert).mutate(); shadowDrawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY)); volumeLayout.setBackgroundDrawable(shadowDrawable); @@ -3743,10 +4760,27 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter isAdmin = peerId == -currentChat.id; } if (view.isSelfUser()) { - items.add(LocaleController.getString("VoipGroupCancelRaiseHand", R.string.VoipGroupCancelRaiseHand)); - icons.add(R.drawable.msg_handdown); - options.add(7); - showWithAvatarPreview = false; + if (view.isHandRaised()) { + items.add(LocaleController.getString("VoipGroupCancelRaiseHand", R.string.VoipGroupCancelRaiseHand)); + icons.add(R.drawable.msg_handdown); + options.add(7); + } + + items.add(view.hasAvatarSet() ? LocaleController.getString("VoipAddPhoto", R.string.VoipAddPhoto) : LocaleController.getString("VoipSetNewPhoto", R.string.VoipSetNewPhoto)); + icons.add(R.drawable.msg_addphoto); + options.add(9); + + if (peerId > 0) { + items.add(TextUtils.isEmpty(participant.about) ? LocaleController.getString("VoipAddBio", R.string.VoipAddBio) : LocaleController.getString("VoipEditBio", R.string.VoipEditBio)); + } else { + items.add(TextUtils.isEmpty(participant.about) ? LocaleController.getString("VoipAddDescription", R.string.VoipAddDescription) : LocaleController.getString("VoipEditDescription", R.string.VoipEditDescription)); + } + icons.add(TextUtils.isEmpty(participant.about) ? R.drawable.msg_addbio : R.drawable.msg_bio); + options.add(10); + + items.add(peerId > 0 ? LocaleController.getString("VoipEditName", R.string.VoipEditName) : LocaleController.getString("VoipEditTitle", R.string.VoipEditTitle)); + icons.add(R.drawable.msg_edit); + options.add(11); } else if (ChatObject.canManageCalls(currentChat)) { if (!isAdmin || !participant.muted) { if (!participant.muted || participant.can_self_unmute) { @@ -3798,7 +4832,6 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } } - ActionBarMenuSubItem[] scrimPopupWindowItems = new ActionBarMenuSubItem[items.size()]; for (int a = 0, N = items.size(); a < N; a++) { ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext(), a == 0, a == N - 1); if (options.get(a) != 2) { @@ -3810,15 +4843,22 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter cell.setTextAndIcon(items.get(a), icons.get(a)); buttonsLayout.addView(cell); final int i = a; + cell.setTag(options.get(a)); cell.setOnClickListener(v1 -> { if (i >= options.size()) { return; } - processSelectedOption(participant, MessageObject.getPeerId(participant.peer), options.get(i)); + TLRPC.TL_groupCallParticipant participant1 = call.participants.get(MessageObject.getPeerId(participant.peer)); + if (participant1 == null) { + participant1 = participant; + } + processSelectedOption(participant1, MessageObject.getPeerId(participant1.peer), options.get(i)); if (scrimPopupWindow != null) { scrimPopupWindow.dismiss(); } else { - dismissAvatarPreview(true); + if (options.get(i) != 9 && options.get(i) != 10 && options.get(i) != 11) { + dismissAvatarPreview(true); + } } }); } @@ -3840,12 +4880,12 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter final ImageLocation thumbLocation; if (peerId > 0) { TLRPC.User currentUser = accountInstance.getMessagesController().getUser(peerId); - imageLocation = ImageLocation.getForUser(currentUser, true); - thumbLocation = ImageLocation.getForUser(currentUser, false); + imageLocation = ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_BIG); + thumbLocation = ImageLocation.getForUserOrChat(currentUser, ImageLocation.TYPE_SMALL); } else { TLRPC.Chat currentChat = accountInstance.getMessagesController().getChat(-peerId); - imageLocation = ImageLocation.getForChat(currentChat, true); - thumbLocation = ImageLocation.getForChat(currentChat, false); + imageLocation = ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_BIG); + thumbLocation = ImageLocation.getForUserOrChat(currentChat, ImageLocation.TYPE_SMALL); } if (imageLocation == null) { @@ -3853,7 +4893,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } else { avatarsViewPager.setParentAvatarImage(scrimView.getAvatarImageView()); avatarsViewPager.setData(peerId); + avatarsViewPager.setCreateThumbFromParent(true); avatarsViewPager.initIfEmpty(imageLocation, thumbLocation); + if (MessageObject.getPeerId(selfPeer) == peerId && currentAvatarUpdater != null && avatarUpdaterDelegate != null && avatarUpdaterDelegate.avatar != null) { + avatarsViewPager.addUploadingImage(avatarUpdaterDelegate.uploadingImageLocation, ImageLocation.getForLocal(avatarUpdaterDelegate.avatar)); + } } if (showWithAvatarPreview) { @@ -3977,11 +5021,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter containerView.invalidate(); avatarsViewPager.setRoundRadius((int) (fromRadius * (1f - progressToAvatarPreview)), (int) (fromRadius * (1f - progressToAvatarPreview))); }); - popupAnimationIndex = NotificationCenter.getInstance(currentAccount).setAnimationInProgress(popupAnimationIndex, new int[]{NotificationCenter.dialogPhotosLoaded, NotificationCenter.fileDidLoad, NotificationCenter.messagesDidLoad}); + popupAnimationIndex = accountInstance.getNotificationCenter().setAnimationInProgress(popupAnimationIndex, new int[]{NotificationCenter.dialogPhotosLoaded, NotificationCenter.fileDidLoad, NotificationCenter.messagesDidLoad}); valueAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { - NotificationCenter.getInstance(currentAccount).onAnimationFinish(popupAnimationIndex); + accountInstance.getNotificationCenter().onAnimationFinish(popupAnimationIndex); avatarPriviewTransitionInProgress = false; progressToAvatarPreview = enter ? 1f : 0f; if (!enter) { @@ -4012,6 +5056,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter avatarPreviewContainer.setTranslationX(1f); avatarPreviewContainer.setTranslationY(1f); } + checkContentOverlayed(); containerView.invalidate(); avatarsViewPager.invalidate(); listView.invalidate(); @@ -4020,6 +5065,8 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter valueAnimator.setInterpolator(CubicBezierInterpolator.DEFAULT); valueAnimator.setDuration(220); valueAnimator.start(); + + checkContentOverlayed(); } private void dismissAvatarPreview(boolean animated) { @@ -4048,6 +5095,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter delayedGroupCallUpdated = false; applyCallParticipantUpdates(); } + checkContentOverlayed(); } } @@ -4081,7 +5129,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } private void updateRows() { - if (delayedGroupCallUpdated) { + if (call == null || call.isScheduled() || delayedGroupCallUpdated) { return; } rowsCount = 0; @@ -4188,7 +5236,11 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter GroupCallTextCell textCell = (GroupCallTextCell) holder.itemView; int color = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_lastSeenTextUnscrolled), Theme.getColor(Theme.key_voipgroup_lastSeenText), actionBar.getTag() != null ? 1.0f : 0.0f, 1.0f); textCell.setColors(color, color); - textCell.setTextAndIcon(LocaleController.getString("VoipGroupInviteMember", R.string.VoipGroupInviteMember), R.drawable.actions_addmember2, true); + if (ChatObject.isChannel(currentChat) && !currentChat.megagroup && !TextUtils.isEmpty(currentChat.username)) { + textCell.setTextAndIcon(LocaleController.getString("VoipGroupShareLink", R.string.VoipGroupShareLink), R.drawable.msg_link, true); + } else { + textCell.setTextAndIcon(LocaleController.getString("VoipGroupInviteMember", R.string.VoipGroupInviteMember), R.drawable.actions_addmember2, true); + } break; case 1: { GroupCallUserCell userCell = (GroupCallUserCell) holder.itemView; @@ -4208,7 +5260,13 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } } if (participant != null) { - userCell.setData(accountInstance, participant, call, MessageObject.getPeerId(selfPeer)); + int peerId = MessageObject.getPeerId(participant.peer); + int selfPeerId = MessageObject.getPeerId(selfPeer); + TLRPC.FileLocation uploadingAvatar = (peerId == selfPeerId && avatarUpdaterDelegate != null) ? avatarUpdaterDelegate.avatar : null; + float uploadingProgress = (uploadingAvatar != null) ? avatarUpdaterDelegate.uploadingProgress : 1f; + boolean animated = userCell.getParticipant() != null && MessageObject.getPeerId(userCell.getParticipant().peer) == peerId; + userCell.setData(accountInstance, participant, call, selfPeerId, uploadingAvatar); + userCell.setUploadProgress(uploadingProgress, animated); } break; } @@ -4241,8 +5299,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter public boolean isEnabled(RecyclerView.ViewHolder holder) { int type = holder.getItemViewType(); if (type == 1) { - GroupCallUserCell userCell = (GroupCallUserCell) holder.itemView; - return !userCell.isSelfUser() || userCell.isHandRaised(); + return true; } else if (type == 3) { return false; } @@ -4406,4 +5463,177 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter } super.onBackPressed(); } + + private class AvatarUpdaterDelegate implements ImageUpdater.ImageUpdaterDelegate { + + public float uploadingProgress; + private TLRPC.FileLocation avatarBig; + private TLRPC.FileLocation avatar; + private ImageLocation uploadingImageLocation; + + private final int peerId; + + private AvatarUpdaterDelegate(int peerId) { + this.peerId = peerId; + } + + @Override + public void didUploadPhoto(TLRPC.InputFile photo, TLRPC.InputFile video, double videoStartTimestamp, String videoPath, TLRPC.PhotoSize bigSize, TLRPC.PhotoSize smallSize) { + AndroidUtilities.runOnUIThread(() -> { + if (photo != null || video != null) { + if (peerId > 0) { + TLRPC.TL_photos_uploadProfilePhoto req = new TLRPC.TL_photos_uploadProfilePhoto(); + if (photo != null) { + req.file = photo; + req.flags |= 1; + } + if (video != null) { + req.video = video; + req.flags |= 2; + req.video_start_ts = videoStartTimestamp; + req.flags |= 4; + } + + accountInstance.getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> { + if (uploadingImageLocation != null) { + avatarsViewPager.removeUploadingImage(uploadingImageLocation); + uploadingImageLocation = null; + } + if (error == null) { + TLRPC.User user = accountInstance.getMessagesController().getUser(accountInstance.getUserConfig().getClientUserId()); + if (user == null) { + user = accountInstance.getUserConfig().getCurrentUser(); + if (user == null) { + return; + } + accountInstance.getMessagesController().putUser(user, false); + } else { + accountInstance.getUserConfig().setCurrentUser(user); + } + TLRPC.TL_photos_photo photos_photo = (TLRPC.TL_photos_photo) response; + ArrayList sizes = photos_photo.photo.sizes; + TLRPC.PhotoSize small = FileLoader.getClosestPhotoSizeWithSize(sizes, 150); + TLRPC.PhotoSize big = FileLoader.getClosestPhotoSizeWithSize(sizes, 800); + TLRPC.VideoSize videoSize = photos_photo.photo.video_sizes.isEmpty() ? null : photos_photo.photo.video_sizes.get(0); + + user.photo = new TLRPC.TL_userProfilePhoto(); + user.photo.photo_id = photos_photo.photo.id; + if (small != null) { + user.photo.photo_small = small.location; + } + if (big != null) { + user.photo.photo_big = big.location; + } + + if (small != null && avatar != null) { + File destFile = FileLoader.getPathToAttach(small, true); + File src = FileLoader.getPathToAttach(avatar, true); + src.renameTo(destFile); + String oldKey = avatar.volume_id + "_" + avatar.local_id + "@50_50"; + String newKey = small.location.volume_id + "_" + small.location.local_id + "@50_50"; + ImageLoader.getInstance().replaceImageInCache(oldKey, newKey, ImageLocation.getForUser(user, ImageLocation.TYPE_SMALL), false); + } + + if (big != null && avatarBig != null) { + File destFile = FileLoader.getPathToAttach(big, true); + File src = FileLoader.getPathToAttach(avatarBig, true); + src.renameTo(destFile); + } + if (videoSize != null && videoPath != null) { + File destFile = FileLoader.getPathToAttach(videoSize, "mp4", true); + File src = new File(videoPath); + src.renameTo(destFile); + } + + accountInstance.getMessagesStorage().clearUserPhotos(user.id); + ArrayList users = new ArrayList<>(); + users.add(user); + accountInstance.getMessagesStorage().putUsersAndChats(users, null, false, true); + + final ImageLocation imageLocation; + final ImageLocation thumbLocation; + TLRPC.User currentUser = accountInstance.getMessagesController().getUser(peerId); + imageLocation = ImageLocation.getForUser(currentUser, ImageLocation.TYPE_BIG); + thumbLocation = ImageLocation.getForUser(currentUser, ImageLocation.TYPE_SMALL); + ImageLocation thumb = ImageLocation.getForLocal(avatarBig); + if (thumb == null) { + thumb = ImageLocation.getForLocal(avatar); + } else { + thumb = thumbLocation; + } + avatarsViewPager.setCreateThumbFromParent(false); + avatarsViewPager.initIfEmpty(imageLocation, thumb); + avatar = null; + avatarBig = null; + AndroidUtilities.updateVisibleRows(listView); + updateAvatarUploadingProgress(1f); + } + + accountInstance.getNotificationCenter().postNotificationName(NotificationCenter.updateInterfaces, MessagesController.UPDATE_MASK_ALL); + accountInstance.getNotificationCenter().postNotificationName(NotificationCenter.mainUserInfoChanged); + accountInstance.getUserConfig().saveConfig(true); + })); + } else { + accountInstance.getMessagesController().changeChatAvatar(-peerId, null, photo, video, videoStartTimestamp, videoPath, smallSize.location, bigSize.location, () -> { + if (uploadingImageLocation != null) { + avatarsViewPager.removeUploadingImage(uploadingImageLocation); + uploadingImageLocation = null; + } + + TLRPC.Chat currentChat = accountInstance.getMessagesController().getChat(-peerId); + ImageLocation imageLocation = ImageLocation.getForChat(currentChat, ImageLocation.TYPE_BIG); + ImageLocation thumbLocation = ImageLocation.getForChat(currentChat, ImageLocation.TYPE_SMALL); + ImageLocation thumb = ImageLocation.getForLocal(avatarBig); + if (thumb == null) { + thumb = ImageLocation.getForLocal(avatar); + } else { + thumb = thumbLocation; + } + avatarsViewPager.setCreateThumbFromParent(false); + avatarsViewPager.initIfEmpty(imageLocation, thumb); + avatar = null; + avatarBig = null; + AndroidUtilities.updateVisibleRows(listView); + updateAvatarUploadingProgress(1f); + }); + } + } else { + avatar = smallSize.location; + avatarBig = bigSize.location; + uploadingImageLocation = ImageLocation.getForLocal(avatarBig); + avatarsViewPager.addUploadingImage(uploadingImageLocation, ImageLocation.getForLocal(avatar)); + AndroidUtilities.updateVisibleRows(listView); + } + }); + } + + @Override + public void didStartUpload(boolean isVideo) { + + } + + @Override + public void onUploadProgressChanged(float progress) { + avatarsViewPager.setUploadProgress(uploadingImageLocation, progress); + updateAvatarUploadingProgress(progress); + } + + public void updateAvatarUploadingProgress(float progress) { + uploadingProgress = progress; + if (listView == null) { + return; + } + for (int i = 0; i < listView.getChildCount(); i++) { + View child = listView.getChildAt(i); + if (child instanceof GroupCallUserCell) { + GroupCallUserCell cell = ((GroupCallUserCell) child); + if (cell.isSelfUser()) { + cell.setUploadProgress(progress, true); + } + } + } + } + } + + } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java index e167d5808..efc3e1523 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java @@ -803,7 +803,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati presentFragment(new ChatActivity(args2), true); } if (inputPhoto != null || inputVideo != null) { - getMessagesController().changeChatAvatar(chat_id, null, inputPhoto, inputVideo, videoTimestamp, inputVideoPath, avatar, avatarBig); + getMessagesController().changeChatAvatar(chat_id, null, inputPhoto, inputVideo, videoTimestamp, inputVideoPath, avatar, avatarBig, null); } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index 3fdbf4626..1fb882579 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -183,7 +183,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa private FrameLayout shadowTabletSide; private View backgroundTablet; private FrameLayout frameLayout; - protected DrawerLayoutContainer drawerLayoutContainer; + public DrawerLayoutContainer drawerLayoutContainer; private DrawerLayoutAdapter drawerLayoutAdapter; private PasscodeView passcodeView; private TermsOfServiceView termsOfServiceView; @@ -584,6 +584,9 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa presentFragment(new ActionIntroActivity(ActionIntroActivity.ACTION_TYPE_NEARBY_LOCATION_ENABLED)); } drawerLayoutContainer.closeDrawer(false); + } else if (id == 13) { + Browser.openUrl(LaunchActivity.this, LocaleController.getString("TelegramFeaturesUrl", R.string.TelegramFeaturesUrl)); + drawerLayoutContainer.closeDrawer(false); } } }); @@ -2279,7 +2282,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa } pushOpened = true; } else if (showGroupVoip) { - GroupCallActivity.create(this, AccountInstance.getInstance(currentAccount)); + GroupCallActivity.create(this, AccountInstance.getInstance(currentAccount), null, null, false, null); if (GroupCallActivity.groupCallInstance != null) { GroupCallActivity.groupCallUiVisible = true; } @@ -4230,6 +4233,8 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa } Bitmap bitmap = Bitmap.createBitmap(drawerLayoutContainer.getMeasuredWidth(), drawerLayoutContainer.getMeasuredHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); + HashMap viewLayerTypes = new HashMap<>(); + invalidateCachedViews(drawerLayoutContainer); drawerLayoutContainer.draw(canvas); frameLayout.removeView(themeSwitchImageView); if (toDark) { @@ -4390,12 +4395,39 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa } else if (id == NotificationCenter.showBulletin) { if (!mainFragmentsStack.isEmpty()) { int type = (int) args[0]; - BaseFragment fragment = mainFragmentsStack.get(mainFragmentsStack.size() - 1); - if (type == Bulletin.TYPE_STICKER) { + + FrameLayout container = null; + BaseFragment fragment = null; + if (GroupCallActivity.groupCallUiVisible && GroupCallActivity.groupCallInstance != null) { + container = GroupCallActivity.groupCallInstance.getContainer(); + } + + if (container == null) { + fragment = mainFragmentsStack.get(mainFragmentsStack.size() - 1); + } + + if (type == Bulletin.TYPE_NAME_CHANGED) { + int peerId = (int) args[1]; + String text = peerId > 0 ? LocaleController.getString("YourNameChanged", R.string.YourNameChanged) : LocaleController.getString("CannelTitleChanged", R.string.ChannelTitleChanged); + (container != null ? BulletinFactory.of(container) : BulletinFactory.of(fragment)).createErrorBulletin(text).show(); + } else if (type == Bulletin.TYPE_BIO_CHANGED) { + int peerId = (int) args[1]; + String text = peerId > 0 ? LocaleController.getString("YourBioChanged", R.string.YourBioChanged) : LocaleController.getString("CannelDescriptionChanged", R.string.ChannelDescriptionChanged); + (container != null ? BulletinFactory.of(container) : BulletinFactory.of(fragment)).createErrorBulletin(text).show(); + } else if (type == Bulletin.TYPE_STICKER) { TLRPC.Document sticker = (TLRPC.Document) args[1]; - Bulletin.make(fragment, new StickerSetBulletinLayout(this, null, (int) args[2], sticker), Bulletin.DURATION_SHORT).show(); + StickerSetBulletinLayout layout = new StickerSetBulletinLayout(this, null, (int) args[2], sticker); + if (fragment != null) { + Bulletin.make(fragment, layout, Bulletin.DURATION_SHORT).show(); + } else { + Bulletin.make(container, layout, Bulletin.DURATION_SHORT).show(); + } } else if (type == Bulletin.TYPE_ERROR) { - BulletinFactory.of(fragment).createErrorBulletin((String)args[1]).show(); + if (fragment != null) { + BulletinFactory.of(fragment).createErrorBulletin((String) args[1]).show(); + } else { + BulletinFactory.of(container).createErrorBulletin((String) args[1]).show(); + } } } } else if (id == NotificationCenter.groupCallUpdated) { @@ -4403,6 +4435,19 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa } } + private void invalidateCachedViews(View parent) { + int layerType = parent.getLayerType(); + if (layerType != View.LAYER_TYPE_NONE) { + parent.invalidate(); + } + if (parent instanceof ViewGroup) { + ViewGroup viewGroup = (ViewGroup) parent; + for (int i = 0; i < viewGroup.getChildCount(); i++) { + invalidateCachedViews(viewGroup.getChildAt(i)); + } + } + } + private void checkWasMutedByAdmin(boolean checkOnly) { VoIPService voIPService = VoIPService.getSharedInstance(); if (voIPService != null && voIPService.groupCall != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LocationActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LocationActivity.java index 0d163880e..e8762679f 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LocationActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LocationActivity.java @@ -1208,7 +1208,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter BackupImageView backupImageView = new BackupImageView(context); backupImageView.setRoundRadius(AndroidUtilities.dp(26)); - backupImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", new AvatarDrawable(chat), chat); + backupImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", new AvatarDrawable(chat), chat); frameLayout1.addView(backupImageView, LayoutHelper.createFrame(52, 52, Gravity.LEFT | Gravity.TOP, 5, 5, 0, 0)); markerImageView = frameLayout1; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java index 03dbc43b5..acab2160a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java @@ -32,6 +32,7 @@ import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Typeface; import android.graphics.drawable.Drawable; +import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Vibrator; @@ -96,6 +97,8 @@ import org.telegram.ui.Cells.CheckBoxCell; import org.telegram.ui.Components.AlertsCreator; import org.telegram.ui.Components.AvatarDrawable; import org.telegram.ui.Components.BackupImageView; +import org.telegram.ui.Components.Bulletin; +import org.telegram.ui.Components.BulletinFactory; import org.telegram.ui.Components.CombinedDrawable; import org.telegram.ui.Components.ContextProgressView; import org.telegram.ui.Components.EditTextBoldCursor; @@ -279,7 +282,20 @@ public class LoginActivity extends BaseFragment { doneItem.setContentDescription(LocaleController.getString("Done", R.string.Done)); doneItem.setVisibility(doneButtonVisible[DONE_TYPE_ACTION] ? View.VISIBLE : View.GONE); - FrameLayout container = new FrameLayout(context); + FrameLayout container = new FrameLayout(context) { + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + MarginLayoutParams marginLayoutParams = (MarginLayoutParams) floatingButtonContainer.getLayoutParams(); + if (Bulletin.getVisibleBulletin() != null && Bulletin.getVisibleBulletin().isShowing()) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + marginLayoutParams.bottomMargin = AndroidUtilities.dp(14) + Bulletin.getVisibleBulletin().getLayout().getMeasuredHeight() - AndroidUtilities.dp(10); + } else { + marginLayoutParams.bottomMargin = AndroidUtilities.dp(14); + } + + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + }; fragmentView = container; ScrollView scrollView = new ScrollView(context) { @@ -614,11 +630,11 @@ public class LoginActivity extends BaseFragment { AndroidUtilities.shakeView(view, 2, 0); } - private void needShowInvalidAlert(final String phoneNumber, final boolean banned) { - if (getParentActivity() == null) { + public static void needShowInvalidAlert(BaseFragment fragment, final String phoneNumber, final boolean banned) { + if (fragment == null || fragment.getParentActivity() == null) { return; } - AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); + AlertDialog.Builder builder = new AlertDialog.Builder(fragment.getParentActivity()); builder.setTitle(LocaleController.getString("AppName", R.string.AppName)); if (banned) { builder.setMessage(LocaleController.getString("BannedPhoneNumber", R.string.BannedPhoneNumber)); @@ -630,8 +646,8 @@ public class LoginActivity extends BaseFragment { PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0); String version = String.format(Locale.US, "%s (%d)", pInfo.versionName, pInfo.versionCode); - Intent mailer = new Intent(Intent.ACTION_SEND); - mailer.setType("message/rfc822"); + Intent mailer = new Intent(Intent.ACTION_SENDTO); + mailer.setData(Uri.parse("mailto:")); mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"login@stel.com"}); if (banned) { mailer.putExtra(Intent.EXTRA_SUBJECT, "Banned phone number: " + phoneNumber); @@ -640,13 +656,17 @@ public class LoginActivity extends BaseFragment { mailer.putExtra(Intent.EXTRA_SUBJECT, "Invalid phone number: " + phoneNumber); mailer.putExtra(Intent.EXTRA_TEXT, "I'm trying to use my mobile phone number: " + phoneNumber + "\nBut Telegram says it's invalid. Please help.\n\nApp version: " + version + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault()); } - getParentActivity().startActivity(Intent.createChooser(mailer, "Send email...")); + fragment.getParentActivity().startActivity(Intent.createChooser(mailer, "Send email...")); } catch (Exception e) { - needShowAlert(LocaleController.getString("AppName", R.string.AppName), LocaleController.getString("NoMailInstalled", R.string.NoMailInstalled)); + AlertDialog.Builder builder2 = new AlertDialog.Builder(fragment.getParentActivity()); + builder2.setTitle(LocaleController.getString("AppName", R.string.AppName)); + builder2.setMessage(LocaleController.getString("NoMailInstalled", R.string.NoMailInstalled)); + builder2.setPositiveButton(LocaleController.getString("OK", R.string.OK), null); + fragment.showDialog(builder2.create()); } }); builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), null); - showDialog(builder.create()); + fragment.showDialog(builder.create()); } private void showDoneButton(boolean show, boolean animated) { @@ -1389,11 +1409,9 @@ public class LoginActivity extends BaseFragment { FileLog.e(e); } if (syncContacts) { - visibleToast = Toast.makeText(getParentActivity(), LocaleController.getString("SyncContactsOn", R.string.SyncContactsOn), Toast.LENGTH_SHORT); - visibleToast.show(); + BulletinFactory.of((FrameLayout) fragmentView).createSimpleBulletin(R.raw.contacts_sync_on, LocaleController.getString("SyncContactsOn", R.string.SyncContactsOn)).show(); } else { - visibleToast = Toast.makeText(getParentActivity(), LocaleController.getString("SyncContactsOff", R.string.SyncContactsOff), Toast.LENGTH_SHORT); - visibleToast.show(); + BulletinFactory.of((FrameLayout) fragmentView).createSimpleBulletin(R.raw.contacts_sync_off, LocaleController.getString("SyncContactsOff", R.string.SyncContactsOff)).show(); } } }); @@ -1657,13 +1675,13 @@ public class LoginActivity extends BaseFragment { } else { if (error.text != null) { if (error.text.contains("PHONE_NUMBER_INVALID")) { - needShowInvalidAlert(req.phone_number, false); + needShowInvalidAlert(LoginActivity.this, req.phone_number, false); } else if (error.text.contains("PHONE_PASSWORD_FLOOD")) { needShowAlert(LocaleController.getString("AppName", R.string.AppName), LocaleController.getString("FloodWait", R.string.FloodWait)); } else if (error.text.contains("PHONE_NUMBER_FLOOD")) { needShowAlert(LocaleController.getString("AppName", R.string.AppName), LocaleController.getString("PhoneNumberFlood", R.string.PhoneNumberFlood)); } else if (error.text.contains("PHONE_NUMBER_BANNED")) { - needShowInvalidAlert(req.phone_number, true); + needShowInvalidAlert(LoginActivity.this, req.phone_number, true); } else if (error.text.contains("PHONE_CODE_EMPTY") || error.text.contains("PHONE_CODE_INVALID")) { needShowAlert(LocaleController.getString("AppName", R.string.AppName), LocaleController.getString("InvalidCode", R.string.InvalidCode)); } else if (error.text.contains("PHONE_CODE_EXPIRED")) { @@ -1961,8 +1979,8 @@ public class LoginActivity extends BaseFragment { PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0); String version = String.format(Locale.US, "%s (%d)", pInfo.versionName, pInfo.versionCode); - Intent mailer = new Intent(Intent.ACTION_SEND); - mailer.setType("message/rfc822"); + Intent mailer = new Intent(Intent.ACTION_SENDTO); + mailer.setData(Uri.parse("mailto:")); mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@stel.com"}); mailer.putExtra(Intent.EXTRA_SUBJECT, "Android registration/login issue " + version + " " + emailPhone); mailer.putExtra(Intent.EXTRA_TEXT, "Phone: " + requestPhone + "\nApp version: " + version + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault() + "\nError: " + lastError); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/MessageStatisticActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/MessageStatisticActivity.java index 961f9c335..e015407c7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/MessageStatisticActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/MessageStatisticActivity.java @@ -391,7 +391,7 @@ public class MessageStatisticActivity extends BaseFragment implements Notificati } thumbImage.setImage(ImageLocation.getForObject(bigThumb, messageObject.photoThumbsObject), "20_20", ImageLocation.getForObject(smallThumb, messageObject.photoThumbsObject), "20_20", size, null, messageObject, 0); } else { - thumbImage.setImage(null, null, ImageLocation.getForObject(smallThumb, messageObject.photoThumbsObject), "20_20", null, messageObject, 0); + thumbImage.setImage(null, null, ImageLocation.getForObject(smallThumb, messageObject.photoThumbsObject), "20_20", (Drawable) null, messageObject, 0); } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PassportActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/PassportActivity.java index 347929365..0ac36701d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PassportActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PassportActivity.java @@ -1526,7 +1526,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter passwordAvatarContainer.addView(avatarImageView, LayoutHelper.createFrame(64, 64, Gravity.CENTER, 0, 8, 0, 0)); AvatarDrawable avatarDrawable = new AvatarDrawable(botUser); - avatarImageView.setImage(ImageLocation.getForUser(botUser, false), "50_50", avatarDrawable, botUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(botUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(botUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, botUser); passwordRequestTextView = new TextInfoPrivacyCell(context); passwordRequestTextView.getTextView().setGravity(Gravity.CENTER_HORIZONTAL); @@ -2001,7 +2001,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter avatarContainer.addView(avatarImageView, LayoutHelper.createFrame(64, 64, Gravity.CENTER, 0, 8, 0, 0)); AvatarDrawable avatarDrawable = new AvatarDrawable(botUser); - avatarImageView.setImage(ImageLocation.getForUser(botUser, false), "50_50", avatarDrawable, botUser); + avatarImageView.setImage(ImageLocation.getForUserOrChat(botUser, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(botUser, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, botUser); bottomCell = new TextInfoPrivacyCell(context); bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow)); @@ -6826,7 +6826,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter return; } if (chatAttachAlert == null) { - chatAttachAlert = new ChatAttachAlert(getParentActivity(), this); + chatAttachAlert = new ChatAttachAlert(getParentActivity(), this, false); chatAttachAlert.setDelegate(new ChatAttachAlert.ChatAttachViewDelegate() { @Override @@ -7384,8 +7384,8 @@ public class PassportActivity extends BaseFragment implements NotificationCenter PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0); String version = String.format(Locale.US, "%s (%d)", pInfo.versionName, pInfo.versionCode); - Intent mailer = new Intent(Intent.ACTION_SEND); - mailer.setType("message/rfc822"); + Intent mailer = new Intent(Intent.ACTION_SENDTO); + mailer.setData(Uri.parse("mailto:")); mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@stel.com"}); mailer.putExtra(Intent.EXTRA_SUBJECT, "Android registration/login issue " + version + " " + phone); mailer.putExtra(Intent.EXTRA_TEXT, "Phone: " + phone + "\nApp version: " + version + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault() + "\nError: " + lastError); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java index f2a7f031d..7c579dc4a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java @@ -24,6 +24,7 @@ import android.content.pm.PackageManager; import android.graphics.Canvas; import android.graphics.Typeface; import android.net.Uri; +import android.os.AsyncTask; import android.os.Build; import android.os.Vibrator; import android.telephony.TelephonyManager; @@ -53,6 +54,7 @@ import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.EditText; import android.widget.FrameLayout; +import android.widget.HorizontalScrollView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ScrollView; @@ -83,6 +85,7 @@ import org.json.JSONObject; import org.telegram.PhoneFormat.PhoneFormat; import org.telegram.messenger.AndroidUtilities; import org.telegram.messenger.ApplicationLoader; +import org.telegram.messenger.BuildVars; import org.telegram.messenger.ContactsController; import org.telegram.messenger.FileLog; import org.telegram.messenger.LocaleController; @@ -103,6 +106,7 @@ import org.telegram.ui.ActionBar.ActionBarMenu; import org.telegram.ui.ActionBar.ActionBarMenuItem; import org.telegram.ui.ActionBar.AlertDialog; import org.telegram.ui.ActionBar.BaseFragment; +import org.telegram.ui.ActionBar.BottomSheet; import org.telegram.ui.ActionBar.Theme; import org.telegram.ui.ActionBar.ThemeDescription; import org.telegram.ui.Cells.EditTextSettingsCell; @@ -120,9 +124,15 @@ import org.telegram.ui.Components.ContextProgressView; import org.telegram.ui.Components.EditTextBoldCursor; import org.telegram.ui.Components.HintEditText; import org.telegram.ui.Components.LayoutHelper; +import org.telegram.ui.Components.UndoView; import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; @@ -131,6 +141,7 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Optional; +import java.util.Scanner; public class PaymentFormActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate { @@ -213,7 +224,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen private boolean need_card_country; private boolean need_card_postcode; private boolean need_card_name; - private String stripeApiKey; + private String providerApiKey; private boolean initGooglePay; private TLRPC.User botUser; @@ -225,6 +236,10 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen private String currentBotName; private String currentItemName; + private BaseFragment parentFragment; + + private LinearLayout tipLayout; + private int currentStep; private boolean passwordOk; private String paymentJson; @@ -233,8 +248,10 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen private String countryName; private String totalPriceDecimal; private TLRPC.TL_payments_paymentForm paymentForm; + private TLRPC.TL_payments_paymentReceipt paymentReceipt; private TLRPC.TL_payments_validatedRequestedInfo requestedInfo; private TLRPC.TL_shippingOption shippingOption; + private Long tipAmount; private TLRPC.TL_payments_validateRequestedInfo validateRequest; private TLRPC.TL_inputPaymentCredentialsGooglePay googlePayCredentials; private String googlePayPublicKey; @@ -244,6 +261,8 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen private boolean donePressed; private boolean canceled; + private String[] totalPrice; + private boolean isWebView; private boolean saveShippingInfo; @@ -254,9 +273,21 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen private static final int LOAD_PAYMENT_DATA_REQUEST_CODE = 991; private interface PaymentFormActivityDelegate { - boolean didSelectNewCard(String tokenJson, String card, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay); - void onFragmentDestroyed(); - void currentPasswordUpdated(TLRPC.TL_account_password password); + default boolean didSelectNewCard(String tokenJson, String card, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay) { + return false; + } + + default void didSelectNewAddress(TLRPC.TL_payments_validateRequestedInfo validateRequested) { + + } + + default void onFragmentDestroyed() { + + } + + default void currentPasswordUpdated(TLRPC.TL_account_password password) { + + } } private class TelegramWebviewProxy { @@ -295,30 +326,34 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } } - public PaymentFormActivity(MessageObject message, TLRPC.TL_payments_paymentReceipt receipt) { + public PaymentFormActivity(TLRPC.TL_payments_paymentReceipt receipt) { currentStep = 5; paymentForm = new TLRPC.TL_payments_paymentForm(); + paymentReceipt = receipt; paymentForm.bot_id = receipt.bot_id; paymentForm.invoice = receipt.invoice; paymentForm.provider_id = receipt.provider_id; paymentForm.users = receipt.users; shippingOption = receipt.shipping; - messageObject = message; - botUser = MessagesController.getInstance(currentAccount).getUser(receipt.bot_id); + if (receipt.tip_amount != 0) { + tipAmount = receipt.tip_amount; + } + botUser = getMessagesController().getUser(receipt.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } - currentItemName = message.messageOwner.media.title; + currentItemName = receipt.title; if (receipt.info != null) { validateRequest = new TLRPC.TL_payments_validateRequestedInfo(); + validateRequest.peer = getMessagesController().getInputPeer(receipt.bot_id); validateRequest.info = receipt.info; } cardName = receipt.credentials_title; } - public PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message) { + public PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message, BaseFragment parentFragment) { int step; if (form.invoice.shipping_address_requested || form.invoice.email_requested || form.invoice.name_requested || form.invoice.phone_requested) { step = 0; @@ -337,11 +372,11 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } else { step = 2; } - init(form, message, step, null, null, null, null, null, false, null); + init(form, message, step, null, null, null, null, null, null, false, null, parentFragment); } - private PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay) { - init(form, message, step, validatedRequestedInfo, shipping, tokenJson, card, request, saveCard, googlePay); + private PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, Long tips, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay, BaseFragment parent) { + init(form, message, step, validatedRequestedInfo, shipping, tips, tokenJson, card, request, saveCard, googlePay, parent); } private void setCurrentPassword(TLRPC.TL_account_password password) { @@ -352,9 +387,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen goToNextStep(); } else { currentPassword = password; - if (currentPassword != null) { - waitingForEmail = !TextUtils.isEmpty(currentPassword.email_unconfirmed_pattern); - } + waitingForEmail = !TextUtils.isEmpty(currentPassword.email_unconfirmed_pattern); updatePasswordFields(); } } @@ -363,17 +396,19 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen delegate = paymentFormActivityDelegate; } - private void init(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay) { + private void init(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, Long tips, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay, BaseFragment parent) { currentStep = step; + parentFragment = parent; paymentJson = tokenJson; googlePayCredentials = googlePay; requestedInfo = validatedRequestedInfo; paymentForm = form; shippingOption = shipping; + tipAmount = tips; messageObject = message; saveCardInfo = saveCard; - isWebView = !"stripe".equals(paymentForm.native_provider); - botUser = MessagesController.getInstance(currentAccount).getUser(form.bot_id); + isWebView = !"stripe".equals(paymentForm.native_provider) && !"smartglocal".equals(paymentForm.native_provider); + botUser = getMessagesController().getUser(form.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { @@ -503,6 +538,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen linearLayout2 = new LinearLayout(context); linearLayout2.setOrientation(LinearLayout.VERTICAL); + linearLayout2.setClipChildren(false); scrollView.addView(linearLayout2, new ScrollView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); if (currentStep == 0) { @@ -548,6 +584,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen ViewGroup container; if (a == FIELD_PHONECODE) { container = new LinearLayout(context); + container.setClipChildren(false); ((LinearLayout) container).setOrientation(LinearLayout.HORIZONTAL); linearLayout2.addView(container, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50)); container.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); @@ -555,10 +592,11 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen container = (ViewGroup) inputFields[FIELD_PHONECODE].getParent(); } else { container = new FrameLayout(context); + container.setClipChildren(false); linearLayout2.addView(container, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50)); container.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - boolean allowDivider = a != FIELD_POSTCODE && a != FIELD_PHONE; + boolean allowDivider = a != FIELD_POSTCODE; if (allowDivider) { if (a == FIELD_EMAIL && !paymentForm.invoice.phone_requested) { allowDivider = false; @@ -1076,10 +1114,14 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } catch (Exception e) { need_card_name = false; } - try { - stripeApiKey = jsonObject.getString("publishable_key"); - } catch (Exception e) { - stripeApiKey = ""; + if (jsonObject.has("public_token")) { + providerApiKey = jsonObject.getString("public_token"); + } else { + try { + providerApiKey = jsonObject.getString("publishable_key"); + } catch (Exception e) { + providerApiKey = ""; + } } initGooglePay = !jsonObject.optBoolean("google_pay_hidden", false); } catch (Exception e) { @@ -1087,7 +1129,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } } - if (initGooglePay && (!TextUtils.isEmpty(stripeApiKey) || googlePayParameters != null)) { + if (initGooglePay && (!TextUtils.isEmpty(providerApiKey) && "stripe".equals(paymentForm.native_provider) || googlePayParameters != null)) { initGooglePay(context); } @@ -1107,8 +1149,9 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen boolean allowDivider = a != FIELD_CVV && a != FIELD_CARD_POSTCODE && !(a == FIELD_CARD_COUNTRY && !need_card_postcode); ViewGroup container = new FrameLayout(context); - linearLayout2.addView(container, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50)); + container.setClipChildren(false); container.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + linearLayout2.addView(container, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50)); View.OnTouchListener onTouchListener = null; inputFields[a] = new EditTextBoldCursor(context); @@ -1285,17 +1328,13 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen break; } } - if (maxLength != 0) { - if (builder.length() > maxLength) { - builder.setLength(maxLength); - } + if (builder.length() > maxLength) { + builder.setLength(maxLength); } } if (hint != null) { - if (maxLength != 0) { - if (builder.length() == maxLength) { - inputFields[FIELD_EXPIRE_DATE].requestFocus(); - } + if (builder.length() == maxLength) { + inputFields[FIELD_EXPIRE_DATE].requestFocus(); } phoneField.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText)); for (int a = 0; a < builder.length(); a++) { @@ -1490,7 +1529,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT)); } else if (a == FIELD_CARD) { createGooglePayButton(context); - container.addView(googlePayContainer, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_VERTICAL | Gravity.RIGHT, 0, 0, 4, 0)); + container.addView(googlePayContainer, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_VERTICAL | (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT), 0, 0, 4, 0)); } if (allowDivider) { @@ -1550,6 +1589,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } ViewGroup container = new FrameLayout(context); + container.setClipChildren(false); linearLayout2.addView(container, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50)); container.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); @@ -1634,7 +1674,11 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } else if (currentStep == 4 || currentStep == 5) { paymentInfoCell = new PaymentInfoCell(context); paymentInfoCell.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - paymentInfoCell.setInvoice((TLRPC.TL_messageMediaInvoice) messageObject.messageOwner.media, currentBotName); + if (messageObject != null) { + paymentInfoCell.setInvoice((TLRPC.TL_messageMediaInvoice) messageObject.messageOwner.media, currentBotName); + } else if (paymentReceipt != null) { + paymentInfoCell.setReceipt(paymentReceipt, currentBotName); + } linearLayout2.addView(paymentInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT)); sectionCell[0] = new ShadowSectionCell(context); @@ -1644,7 +1688,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen if (shippingOption != null) { arrayList.addAll(shippingOption.prices); } - final String totalPrice = getTotalPriceString(arrayList); + totalPrice = new String[1]; for (int a = 0; a < arrayList.size(); a++) { TLRPC.TL_labeledPrice price = arrayList.get(a); @@ -1655,51 +1699,290 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen linearLayout2.addView(priceCell); } + if (currentStep == 5 && tipAmount != null) { + TextPriceCell priceCell = new TextPriceCell(context); + priceCell.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + priceCell.setTextAndValue(LocaleController.getString("PaymentTip", R.string.PaymentTip), LocaleController.getInstance().formatCurrencyString(tipAmount, paymentForm.invoice.currency), false); + linearLayout2.addView(priceCell); + } + TextPriceCell priceCell = new TextPriceCell(context); priceCell.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - priceCell.setTextAndValue(LocaleController.getString("PaymentTransactionTotal", R.string.PaymentTransactionTotal), totalPrice, true); + totalPrice[0] = getTotalPriceString(arrayList); + priceCell.setTextAndValue(LocaleController.getString("PaymentTransactionTotal", R.string.PaymentTransactionTotal), totalPrice[0], true); + + if (currentStep == 4 && (paymentForm.invoice.flags & 256) != 0) { + ViewGroup container = new FrameLayout(context); + container.setClipChildren(false); + container.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + linearLayout2.addView(container, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, paymentForm.invoice.suggested_tip_amounts.isEmpty() ? 40 : 78)); + container.setOnClickListener(v -> { + inputFields[0].requestFocus(); + AndroidUtilities.showKeyboard(inputFields[0]); + }); + + TextPriceCell cell = new TextPriceCell(context); + cell.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + cell.setTextAndValue(LocaleController.getString("PaymentTipOptional", R.string.PaymentTipOptional), "", false); + container.addView(cell); + + inputFields = new EditTextBoldCursor[1]; + inputFields[0] = new EditTextBoldCursor(context); + inputFields[0].setTag(0); + inputFields[0].setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); + inputFields[0].setHintTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2)); + inputFields[0].setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2)); + inputFields[0].setBackgroundDrawable(null); + inputFields[0].setCursorColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText)); + inputFields[0].setCursorSize(AndroidUtilities.dp(20)); + inputFields[0].setCursorWidth(1.5f); + inputFields[0].setInputType(InputType.TYPE_CLASS_PHONE); + inputFields[0].setImeOptions(EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI); + inputFields[0].setHint(LocaleController.getInstance().formatCurrencyString(0, paymentForm.invoice.currency)); + inputFields[0].setPadding(0, 0, 0, AndroidUtilities.dp(6)); + inputFields[0].setGravity(LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT); + container.addView(inputFields[0], LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 21, 9, 21, 1)); + inputFields[0].addTextChangedListener(new TextWatcher() { + + private boolean anyBefore; + private String overrideText; + private boolean dotEntered; + + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + if (ignoreOnTextChange) { + return; + } + anyBefore = !TextUtils.isEmpty(s); + overrideText = null; + if (count == 1 && after == 0) { + String fixed = LocaleController.fixNumbers(s); + char actionCh = fixed.charAt(start); + if (actionCh < '0' || actionCh > '9') { + while (--start > 0) { + actionCh = fixed.charAt(start); + if (actionCh >= '0' && actionCh <= '9') { + overrideText = fixed.substring(0, start) + fixed.substring(start + 1); + break; + } + } + } + } + } + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + + } + + @Override + public void afterTextChanged(Editable s) { + if (ignoreOnTextChange) { + return; + } + long oldAmount = tipAmount != null ? tipAmount : 0; + + String text; + if (overrideText != null) { + text = overrideText; + } else { + text = LocaleController.fixNumbers(s.toString()); + } + tipAmount = Utilities.parseLong(PhoneFormat.stripExceptNumbers(text)); + /*if (!dotEntered) { + + } + if (text.endsWith(",") || text.endsWith(".")) { + dotEntered = true; + } + if (tipAmount == 0) { + dotEntered = false; + }*/ + if (paymentForm.invoice.max_tip_amount != 0 && tipAmount > paymentForm.invoice.max_tip_amount) { + tipAmount = paymentForm.invoice.max_tip_amount; + } + int start = inputFields[0].getSelectionStart(); + String phoneChars = "0123456789,."; + String str = inputFields[0].getText().toString(); + StringBuilder builder = new StringBuilder(str.length()); + for (int a = 0; a < str.length(); a++) { + String ch = str.substring(a, a + 1); + if (phoneChars.contains(ch)) { + builder.append(ch); + } + } + ignoreOnTextChange = true; + inputFields[0].setText(LocaleController.getInstance().formatCurrencyString(tipAmount, false, paymentForm.invoice.currency)); + if (oldAmount < tipAmount && oldAmount != 0 && anyBefore && start >= 0) { + inputFields[0].setSelection(Math.min(start, inputFields[0].length())); + } else { + inputFields[0].setSelection(inputFields[0].length()); + } + totalPrice[0] = getTotalPriceString(arrayList); + priceCell.setTextAndValue(LocaleController.getString("PaymentTransactionTotal", R.string.PaymentTransactionTotal), totalPrice[0], true); + if (payTextView != null) { + payTextView.setText(LocaleController.formatString("PaymentCheckoutPay", R.string.PaymentCheckoutPay, totalPrice[0])); + } + checkSelectedTip(); + ignoreOnTextChange = false; + } + }); + inputFields[0].setOnEditorActionListener((textView, i, keyEvent) -> { + if (i == EditorInfo.IME_ACTION_DONE) { + AndroidUtilities.hideKeyboard(textView); + return true; + } + return false; + }); + inputFields[0].requestFocus(); + + if (!paymentForm.invoice.suggested_tip_amounts.isEmpty()) { + HorizontalScrollView scrollView = new HorizontalScrollView(context); + scrollView.setHorizontalScrollBarEnabled(false); + scrollView.setVerticalScrollBarEnabled(false); + scrollView.setClipToPadding(false); + scrollView.setPadding(AndroidUtilities.dp(21), 0, AndroidUtilities.dp(21), 0); + scrollView.setFillViewport(true); + container.addView(scrollView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 30, Gravity.LEFT | Gravity.TOP, 0, 44, 0, 0)); + int[] maxTextWidth = new int[1]; + int[] textWidths = new int[1]; + int N = paymentForm.invoice.suggested_tip_amounts.size(); + + tipLayout = new LinearLayout(context) { + + boolean ignoreLayout; + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + int availableSize = MeasureSpec.getSize(widthMeasureSpec); + ignoreLayout = true; + int gaps = AndroidUtilities.dp(9) * (N - 1); + if (maxTextWidth[0] * N + gaps <= availableSize) { + setWeightSum(1.0f); + for (int a = 0, N2 = getChildCount(); a < N2; a++) { + getChildAt(a).getLayoutParams().width = 0; + ((LayoutParams) getChildAt(a).getLayoutParams()).weight = 1.0f / N2; + } + } else if (textWidths[0] + gaps <= availableSize) { + setWeightSum(1.0f); + availableSize -= gaps; + float extraWeight = 1.0f; + for (int a = 0, N2 = getChildCount(); a < N2; a++) { + View child = getChildAt(a); + LayoutParams layoutParams = (LayoutParams) child.getLayoutParams(); + layoutParams.width = 0; + int width = (Integer) child.getTag(R.id.width_tag); + layoutParams.weight = width / (float) availableSize; + extraWeight -= layoutParams.weight; + } + extraWeight /= (N - 1); + if (extraWeight > 0) { + for (int a = 0, N2 = getChildCount(); a < N2; a++) { + View child = getChildAt(a); + LayoutParams layoutParams = (LayoutParams) child.getLayoutParams(); + int width = (Integer) child.getTag(R.id.width_tag); + if (width != maxTextWidth[0]) { + layoutParams.weight += extraWeight; + } + } + } + } else { + setWeightSum(0.0f); + for (int a = 0, N2 = getChildCount(); a < N2; a++) { + getChildAt(a).getLayoutParams().width = LayoutHelper.WRAP_CONTENT; + ((LayoutParams) getChildAt(a).getLayoutParams()).weight = 0.0f; + } + } + ignoreLayout = false; + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + + @Override + public void requestLayout() { + if (ignoreLayout) { + return; + } + super.requestLayout(); + } + }; + tipLayout.setOrientation(LinearLayout.HORIZONTAL); + scrollView.addView(tipLayout, LayoutHelper.createScroll(LayoutHelper.MATCH_PARENT, 30, Gravity.LEFT | Gravity.TOP)); + int color = Theme.getColor(Theme.key_contacts_inviteBackground); + for (int a = 0; a < N; a++) { + long amount; + if (LocaleController.isRTL) { + amount = paymentForm.invoice.suggested_tip_amounts.get(N - a - 1); + } else { + amount = paymentForm.invoice.suggested_tip_amounts.get(a); + } + String text = LocaleController.getInstance().formatCurrencyString(amount, paymentForm.invoice.currency); + TextView valueTextView = new TextView(context); + valueTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); + valueTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); + valueTextView.setLines(1); + valueTextView.setTag(amount); + valueTextView.setMaxLines(1); + valueTextView.setText(text); + valueTextView.setPadding(AndroidUtilities.dp(15), 0, AndroidUtilities.dp(15), 0); + valueTextView.setTextColor(Theme.getColor(Theme.key_chats_secretName)); + valueTextView.setBackground(Theme.createRoundRectDrawable(AndroidUtilities.dp(15), color & 0x1fffffff)); + valueTextView.setSingleLine(true); + valueTextView.setGravity(Gravity.CENTER); + tipLayout.addView(valueTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.CENTER_VERTICAL | Gravity.LEFT, 0, 0, a != N -1 ? 9 : 0, 0)); + valueTextView.setOnClickListener(v -> { + long amoumt = (Long) valueTextView.getTag(); + if (tipAmount != null && amoumt == tipAmount) { + inputFields[0].setText(LocaleController.getInstance().formatCurrencyString(0, false, paymentForm.invoice.currency)); + } else { + inputFields[0].setText(LocaleController.getInstance().formatCurrencyString(amount, false, paymentForm.invoice.currency)); + } + inputFields[0].setSelection(inputFields[0].length()); + }); + int width = (int) Math.ceil(valueTextView.getPaint().measureText(text)) + AndroidUtilities.dp(30); + valueTextView.setTag(R.id.width_tag, width); + maxTextWidth[0] = Math.max(maxTextWidth[0], width); + textWidths[0] += width; + } + } + } + linearLayout2.addView(priceCell); - View divider = new View(context) { - @Override - protected void onDraw(Canvas canvas) { - canvas.drawLine(LocaleController.isRTL ? 0 : AndroidUtilities.dp(20), getMeasuredHeight() - 1, getMeasuredWidth() - (LocaleController.isRTL ? AndroidUtilities.dp(20) : 0), getMeasuredHeight() - 1, Theme.dividerPaint); - } - }; - divider.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - dividers.add(divider); - linearLayout2.addView(divider, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 1, Gravity.LEFT | Gravity.BOTTOM)); + sectionCell[2] = new ShadowSectionCell(context); + sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)); + linearLayout2.addView(sectionCell[2], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT)); detailSettingsCell[0] = new TextDetailSettingsCell(context); detailSettingsCell[0].setBackgroundDrawable(Theme.getSelectorDrawable(true)); - detailSettingsCell[0].setTextAndValue(cardName, LocaleController.getString("PaymentCheckoutMethod", R.string.PaymentCheckoutMethod), true); + detailSettingsCell[0].setTextAndValueAndIcon(cardName != null && cardName.length() > 1 ? cardName.substring(0, 1).toUpperCase() + cardName.substring(1) : cardName, LocaleController.getString("PaymentCheckoutMethod", R.string.PaymentCheckoutMethod), R.drawable.payment_card, true); linearLayout2.addView(detailSettingsCell[0]); if (currentStep == 4) { detailSettingsCell[0].setOnClickListener(v -> { - PaymentFormActivity activity = new PaymentFormActivity(paymentForm, messageObject, 2, requestedInfo, shippingOption, null, cardName, validateRequest, saveCardInfo, null); - activity.setDelegate(new PaymentFormActivityDelegate() { - @Override - public boolean didSelectNewCard(String tokenJson, String card, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay) { - paymentForm.saved_credentials = null; - paymentJson = tokenJson; - saveCardInfo = saveCard; - cardName = card; - googlePayCredentials = googlePay; - detailSettingsCell[0].setTextAndValue(cardName, LocaleController.getString("PaymentCheckoutMethod", R.string.PaymentCheckoutMethod), true); - return false; - } - - @Override - public void onFragmentDestroyed() { - - } - - @Override - public void currentPasswordUpdated(TLRPC.TL_account_password password) { - - } - }); - presentFragment(activity); + if (getParentActivity() == null) { + return; + } + BottomSheet.Builder builder = new BottomSheet.Builder(getParentActivity()); + builder.setTitle(LocaleController.getString("PaymentCheckoutMethod", R.string.PaymentCheckoutMethod), true); + builder.setItems(new CharSequence[]{cardName, LocaleController.getString("PaymentCheckoutMethodNewCard", R.string.PaymentCheckoutMethodNewCard)}, + new int[]{R.drawable.payment_card, R.drawable.msg_addbot}, (dialog, which) -> { + if (which == 1) { + PaymentFormActivity activity = new PaymentFormActivity(paymentForm, messageObject, 2, requestedInfo, shippingOption, tipAmount, null, cardName, validateRequest, saveCardInfo, null, parentFragment); + activity.setDelegate(new PaymentFormActivityDelegate() { + @Override + public boolean didSelectNewCard(String tokenJson, String card, boolean saveCard, TLRPC.TL_inputPaymentCredentialsGooglePay googlePay) { + paymentForm.saved_credentials = null; + paymentJson = tokenJson; + saveCardInfo = saveCard; + cardName = card; + googlePayCredentials = googlePay; + detailSettingsCell[0].setTextAndValue(cardName, LocaleController.getString("PaymentCheckoutMethod", R.string.PaymentCheckoutMethod), true); + return false; + } + }); + presentFragment(activity); + } + }); + showDialog(builder.create()); }); } @@ -1714,7 +1997,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen if (providerUser != null) { detailSettingsCell[1] = new TextDetailSettingsCell(context); detailSettingsCell[1].setBackgroundDrawable(Theme.getSelectorDrawable(true)); - detailSettingsCell[1].setTextAndValue(providerName = ContactsController.formatName(providerUser.first_name, providerUser.last_name), LocaleController.getString("PaymentCheckoutProvider", R.string.PaymentCheckoutProvider), true); + detailSettingsCell[1].setTextAndValueAndIcon(providerName = ContactsController.formatName(providerUser.first_name, providerUser.last_name), LocaleController.getString("PaymentCheckoutProvider", R.string.PaymentCheckoutProvider), R.drawable.payment_provider, validateRequest != null && (validateRequest.info.shipping_address != null || shippingOption != null)); linearLayout2.addView(detailSettingsCell[1]); } else { providerName = ""; @@ -1722,45 +2005,105 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen if (validateRequest != null) { if (validateRequest.info.shipping_address != null) { - String address = String.format("%s %s, %s, %s, %s, %s", validateRequest.info.shipping_address.street_line1, validateRequest.info.shipping_address.street_line2, validateRequest.info.shipping_address.city, validateRequest.info.shipping_address.state, validateRequest.info.shipping_address.country_iso2, validateRequest.info.shipping_address.post_code); detailSettingsCell[2] = new TextDetailSettingsCell(context); - detailSettingsCell[2].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - detailSettingsCell[2].setTextAndValue(address, LocaleController.getString("PaymentShippingAddress", R.string.PaymentShippingAddress), true); linearLayout2.addView(detailSettingsCell[2]); + if (currentStep == 4) { + detailSettingsCell[2].setBackgroundDrawable(Theme.getSelectorDrawable(true)); + detailSettingsCell[2].setOnClickListener(v -> { + PaymentFormActivity activity = new PaymentFormActivity(paymentForm, messageObject, 0, requestedInfo, shippingOption, tipAmount, null, cardName, validateRequest, saveCardInfo, null, parentFragment); + activity.setDelegate(new PaymentFormActivityDelegate() { + @Override + public void didSelectNewAddress(TLRPC.TL_payments_validateRequestedInfo validateRequested) { + validateRequest = validateRequested; + setAddressFields(); + } + }); + presentFragment(activity); + }); + } else { + detailSettingsCell[2].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + } } if (validateRequest.info.name != null) { detailSettingsCell[3] = new TextDetailSettingsCell(context); - detailSettingsCell[3].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - detailSettingsCell[3].setTextAndValue(validateRequest.info.name, LocaleController.getString("PaymentCheckoutName", R.string.PaymentCheckoutName), true); linearLayout2.addView(detailSettingsCell[3]); + if (currentStep == 4) { + detailSettingsCell[3].setBackgroundDrawable(Theme.getSelectorDrawable(true)); + detailSettingsCell[3].setOnClickListener(v -> { + PaymentFormActivity activity = new PaymentFormActivity(paymentForm, messageObject, 0, requestedInfo, shippingOption, tipAmount, null, cardName, validateRequest, saveCardInfo, null, parentFragment); + activity.setDelegate(new PaymentFormActivityDelegate() { + @Override + public void didSelectNewAddress(TLRPC.TL_payments_validateRequestedInfo validateRequested) { + validateRequest = validateRequested; + setAddressFields(); + } + }); + presentFragment(activity); + }); + } else { + detailSettingsCell[3].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + } } if (validateRequest.info.phone != null) { detailSettingsCell[4] = new TextDetailSettingsCell(context); - detailSettingsCell[4].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - detailSettingsCell[4].setTextAndValue(PhoneFormat.getInstance().format(validateRequest.info.phone), LocaleController.getString("PaymentCheckoutPhoneNumber", R.string.PaymentCheckoutPhoneNumber), true); linearLayout2.addView(detailSettingsCell[4]); + if (currentStep == 4) { + detailSettingsCell[4].setBackgroundDrawable(Theme.getSelectorDrawable(true)); + detailSettingsCell[4].setOnClickListener(v -> { + PaymentFormActivity activity = new PaymentFormActivity(paymentForm, messageObject, 0, requestedInfo, shippingOption, tipAmount, null, cardName, validateRequest, saveCardInfo, null, parentFragment); + activity.setDelegate(new PaymentFormActivityDelegate() { + @Override + public void didSelectNewAddress(TLRPC.TL_payments_validateRequestedInfo validateRequested) { + validateRequest = validateRequested; + setAddressFields(); + } + }); + presentFragment(activity); + }); + } else { + detailSettingsCell[4].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + } } if (validateRequest.info.email != null) { detailSettingsCell[5] = new TextDetailSettingsCell(context); - detailSettingsCell[5].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - detailSettingsCell[5].setTextAndValue(validateRequest.info.email, LocaleController.getString("PaymentCheckoutEmail", R.string.PaymentCheckoutEmail), true); linearLayout2.addView(detailSettingsCell[5]); + if (currentStep == 4) { + detailSettingsCell[5].setBackgroundDrawable(Theme.getSelectorDrawable(true)); + detailSettingsCell[5].setOnClickListener(v -> { + PaymentFormActivity activity = new PaymentFormActivity(paymentForm, messageObject, 0, requestedInfo, shippingOption, tipAmount, null, cardName, validateRequest, saveCardInfo, null, parentFragment); + activity.setDelegate(new PaymentFormActivityDelegate() { + @Override + public void didSelectNewAddress(TLRPC.TL_payments_validateRequestedInfo validateRequested) { + validateRequest = validateRequested; + setAddressFields(); + } + }); + presentFragment(activity); + }); + } else { + detailSettingsCell[5].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); + } } if (shippingOption != null) { detailSettingsCell[6] = new TextDetailSettingsCell(context); detailSettingsCell[6].setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); - detailSettingsCell[6].setTextAndValue(shippingOption.title, LocaleController.getString("PaymentCheckoutShippingMethod", R.string.PaymentCheckoutShippingMethod), false); + detailSettingsCell[6].setTextAndValueAndIcon(shippingOption.title, LocaleController.getString("PaymentCheckoutShippingMethod", R.string.PaymentCheckoutShippingMethod), R.drawable.payment_delivery, false); linearLayout2.addView(detailSettingsCell[6]); } + setAddressFields(); } if (currentStep == 4) { bottomLayout = new FrameLayout(context); - bottomLayout.setBackgroundDrawable(Theme.getSelectorDrawable(true)); + if (Build.VERSION.SDK_INT >= 21) { + bottomLayout.setBackgroundDrawable(Theme.getSelectorDrawable(Theme.getColor(Theme.key_listSelector), Theme.key_contacts_inviteBackground)); + } else { + bottomLayout.setBackgroundColor(Theme.getColor(Theme.key_contacts_inviteBackground)); + } frameLayout.addView(bottomLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM)); bottomLayout.setOnClickListener(v -> { if (botUser != null && !botUser.verified) { @@ -1771,18 +2114,18 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); builder.setTitle(LocaleController.getString("PaymentWarning", R.string.PaymentWarning)); builder.setMessage(LocaleController.formatString("PaymentWarningText", R.string.PaymentWarningText, currentBotName, providerName)); - builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialogInterface, i) -> showPayAlert(totalPrice)); + builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialogInterface, i) -> showPayAlert(totalPrice[0])); showDialog(builder.create()); } else { - showPayAlert(totalPrice); + showPayAlert(totalPrice[0]); } } else { - showPayAlert(totalPrice); + showPayAlert(totalPrice[0]); } }); payTextView = new TextView(context); - payTextView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlueText6)); - payTextView.setText(LocaleController.formatString("PaymentCheckoutPay", R.string.PaymentCheckoutPay, totalPrice)); + payTextView.setTextColor(Theme.getColor(Theme.key_contacts_inviteText)); + payTextView.setText(LocaleController.formatString("PaymentCheckoutPay", R.string.PaymentCheckoutPay, totalPrice[0])); payTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); payTextView.setGravity(Gravity.CENTER); payTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); @@ -1790,12 +2133,10 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen progressViewButton = new ContextProgressView(context, 0); progressViewButton.setVisibility(View.INVISIBLE); + int color = Theme.getColor(Theme.key_contacts_inviteText); + progressViewButton.setColors(color & 0x2fffffff, color); bottomLayout.addView(progressViewButton, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); - View shadow = new View(context); - shadow.setBackgroundResource(R.drawable.header_shadow_reverse); - frameLayout.addView(shadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 3, Gravity.LEFT | Gravity.BOTTOM, 0, 0, 0, 48)); - doneItem.setEnabled(false); doneItem.getContentView().setVisibility(View.INVISIBLE); @@ -1957,6 +2298,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } ViewGroup container = new FrameLayout(context); + container.setClipChildren(false); linearLayout2.addView(container, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50)); container.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite)); @@ -2039,6 +2381,35 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen return fragmentView; } + private void checkSelectedTip() { + int color = Theme.getColor(Theme.key_contacts_inviteBackground); + for (int b = 0, N2 = tipLayout.getChildCount(); b < N2; b++) { + View child = tipLayout.getChildAt(b); + int alpha = child.getTag().equals(tipAmount) ? 0x3fffffff : 0x1fffffff; + Theme.setDrawableColor(child.getBackground(), color & alpha); + child.invalidate(); + } + } + + private void setAddressFields() { + if (validateRequest.info.shipping_address != null) { + String address = String.format("%s %s, %s, %s, %s, %s", validateRequest.info.shipping_address.street_line1, validateRequest.info.shipping_address.street_line2, validateRequest.info.shipping_address.city, validateRequest.info.shipping_address.state, validateRequest.info.shipping_address.country_iso2, validateRequest.info.shipping_address.post_code); + detailSettingsCell[2].setTextAndValueAndIcon(address, LocaleController.getString("PaymentShippingAddress", R.string.PaymentShippingAddress), R.drawable.payment_address, true); + } + + if (validateRequest.info.name != null) { + detailSettingsCell[3].setTextAndValueAndIcon(validateRequest.info.name, LocaleController.getString("PaymentCheckoutName", R.string.PaymentCheckoutName), R.drawable.payment_name, true); + } + + if (validateRequest.info.phone != null) { + detailSettingsCell[4].setTextAndValueAndIcon(PhoneFormat.getInstance().format(validateRequest.info.phone), LocaleController.getString("PaymentCheckoutPhoneNumber", R.string.PaymentCheckoutPhoneNumber), R.drawable.payment_phone, validateRequest.info.email != null || shippingOption != null); + } + + if (validateRequest.info.email != null) { + detailSettingsCell[5].setTextAndValueAndIcon(validateRequest.info.email, LocaleController.getString("PaymentCheckoutEmail", R.string.PaymentCheckoutEmail), R.drawable.payment_email, shippingOption != null); + } + } + private void createGooglePayButton(Context context) { googlePayContainer = new FrameLayout(context); googlePayContainer.setBackgroundDrawable(Theme.getSelectorDrawable(true)); @@ -2076,7 +2447,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } else { put("parameters", new JSONObject() {{ put("gateway", "stripe"); - put("stripe:publishableKey", stripeApiKey); + put("stripe:publishableKey", providerApiKey); put("stripe:version", StripeApiHandler.VERSION); }}); } @@ -2278,13 +2649,6 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen parameters.put("allowedAuthMethods", new JSONArray(SUPPORTED_METHODS)); parameters.put("allowedCardNetworks", new JSONArray(SUPPORTED_NETWORKS)); - // Optionally, you can add billing address/phone number associated with a CARD payment method. - /*parameters.put("billingAddressRequired", true); - - JSONObject billingAddressParameters = new JSONObject(); - billingAddressParameters.put("format", "FULL"); - parameters.put("billingAddressParameters", billingAddressParameters);*/ - cardPaymentMethod.put("parameters", parameters); return cardPaymentMethod; @@ -2344,6 +2708,9 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen for (int a = 0; a < prices.size(); a++) { amount += prices.get(a).amount; } + if (tipAmount != null) { + amount += tipAmount; + } return LocaleController.getInstance().formatCurrencyString(amount, paymentForm.invoice.currency); } @@ -2409,11 +2776,17 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen webView.loadUrl(webViewUrl = paymentForm.url); } } else if (currentStep == 2) { - inputFields[FIELD_CARD].requestFocus(); - AndroidUtilities.showKeyboard(inputFields[FIELD_CARD]); + AndroidUtilities.runOnUIThread(() -> { + inputFields[FIELD_CARD].requestFocus(); + AndroidUtilities.showKeyboard(inputFields[FIELD_CARD]); + }, 100); } else if (currentStep == 3) { inputFields[FIELD_SAVEDPASSWORD].requestFocus(); AndroidUtilities.showKeyboard(inputFields[FIELD_SAVEDPASSWORD]); + } else if (currentStep == 4) { + if (inputFields != null) { + inputFields[0].requestFocus(); + } } else if (currentStep == 6) { if (!waitingForEmail) { inputFields[FIELD_ENTERPASSWORD].requestFocus(); @@ -2444,6 +2817,9 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen AndroidUtilities.runOnUIThread(() -> { if (resultCode == Activity.RESULT_OK) { PaymentData paymentData = PaymentData.getFromIntent(data); + if (paymentData == null) { + return; + } final String paymentInfo = paymentData.toJson(); if (paymentInfo == null) { return; @@ -2477,7 +2853,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } else { if (resultCode == AutoResolveHelper.RESULT_ERROR) { Status status = AutoResolveHelper.getStatusFromIntent(data); - FileLog.e("android pay error " + status.getStatusMessage()); + FileLog.e("android pay error " + (status != null ? status.getStatusMessage() : "")); } } showEditDoneProgress(true, false); @@ -2489,25 +2865,30 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen private void goToNextStep() { if (currentStep == 0) { - int nextStep; - if (paymentForm.invoice.flexible) { - nextStep = 1; - } else if (paymentForm.saved_credentials != null) { - if (UserConfig.getInstance(currentAccount).tmpPassword != null) { - if (UserConfig.getInstance(currentAccount).tmpPassword.valid_until < ConnectionsManager.getInstance(currentAccount).getCurrentTime() + 60) { - UserConfig.getInstance(currentAccount).tmpPassword = null; - UserConfig.getInstance(currentAccount).saveConfig(false); - } - } - if (UserConfig.getInstance(currentAccount).tmpPassword != null) { - nextStep = 4; - } else { - nextStep = 3; - } + if (delegate != null) { + delegate.didSelectNewAddress(validateRequest); + finishFragment(); } else { - nextStep = 2; + int nextStep; + if (paymentForm.invoice.flexible) { + nextStep = 1; + } else if (paymentForm.saved_credentials != null) { + if (UserConfig.getInstance(currentAccount).tmpPassword != null) { + if (UserConfig.getInstance(currentAccount).tmpPassword.valid_until < ConnectionsManager.getInstance(currentAccount).getCurrentTime() + 60) { + UserConfig.getInstance(currentAccount).tmpPassword = null; + UserConfig.getInstance(currentAccount).saveConfig(false); + } + } + if (UserConfig.getInstance(currentAccount).tmpPassword != null) { + nextStep = 4; + } else { + nextStep = 3; + } + } else { + nextStep = 2; + } + presentFragment(new PaymentFormActivity(paymentForm, messageObject, nextStep, requestedInfo, null, null, null, cardName, validateRequest, saveCardInfo, googlePayCredentials, parentFragment), isWebView); } - presentFragment(new PaymentFormActivity(paymentForm, messageObject, nextStep, requestedInfo, null, null, cardName, validateRequest, saveCardInfo, googlePayCredentials), isWebView); } else if (currentStep == 1) { int nextStep; if (paymentForm.saved_credentials != null) { @@ -2525,10 +2906,10 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } else { nextStep = 2; } - presentFragment(new PaymentFormActivity(paymentForm, messageObject, nextStep, requestedInfo, shippingOption, null, cardName, validateRequest, saveCardInfo, googlePayCredentials), isWebView); + presentFragment(new PaymentFormActivity(paymentForm, messageObject, nextStep, requestedInfo, shippingOption, tipAmount, null, cardName, validateRequest, saveCardInfo, googlePayCredentials, parentFragment), isWebView); } else if (currentStep == 2) { if (paymentForm.password_missing && saveCardInfo) { - passwordFragment = new PaymentFormActivity(paymentForm, messageObject, 6, requestedInfo, shippingOption, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials); + passwordFragment = new PaymentFormActivity(paymentForm, messageObject, 6, requestedInfo, shippingOption, tipAmount, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials, parentFragment); passwordFragment.setCurrentPassword(currentPassword); passwordFragment.setDelegate(new PaymentFormActivityDelegate() { @Override @@ -2558,7 +2939,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen delegate.didSelectNewCard(paymentJson, cardName, saveCardInfo, googlePayCredentials); finishFragment(); } else { - presentFragment(new PaymentFormActivity(paymentForm, messageObject, 4, requestedInfo, shippingOption, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials), isWebView); + presentFragment(new PaymentFormActivity(paymentForm, messageObject, 4, requestedInfo, shippingOption, tipAmount, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials, parentFragment), isWebView); } } } else if (currentStep == 3) { @@ -2568,13 +2949,13 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } else { nextStep = 2; } - presentFragment(new PaymentFormActivity(paymentForm, messageObject, nextStep, requestedInfo, shippingOption, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials), !passwordOk); + presentFragment(new PaymentFormActivity(paymentForm, messageObject, nextStep, requestedInfo, shippingOption, tipAmount, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials, parentFragment), true); } else if (currentStep == 4) { NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.paymentFinished); finishFragment(); } else if (currentStep == 6) { if (!delegate.didSelectNewCard(paymentJson, cardName, saveCardInfo, googlePayCredentials)) { - presentFragment(new PaymentFormActivity(paymentForm, messageObject, 4, requestedInfo, shippingOption, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials), true); + presentFragment(new PaymentFormActivity(paymentForm, messageObject, 4, requestedInfo, shippingOption, tipAmount, paymentJson, cardName, validateRequest, saveCardInfo, googlePayCredentials, parentFragment), true); } else { finishFragment(); } @@ -2585,7 +2966,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen if (bottomCell[0] == null || sectionCell[2] == null) { return; } - if ((paymentForm.password_missing || paymentForm.can_save_credentials) && (webView == null || webView != null && !webviewLoading)) { + if ((paymentForm.password_missing || paymentForm.can_save_credentials) && (webView == null || !webviewLoading)) { SpannableStringBuilder text = new SpannableStringBuilder(LocaleController.getString("PaymentCardSavePaymentInformationInfoLine1", R.string.PaymentCardSavePaymentInformationInfoLine1)); if (paymentForm.password_missing) { loadPasswordInfo(); @@ -2746,10 +3127,8 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen req.new_settings.hint = ""; req.new_settings.new_algo = currentPassword.new_algo; - if (email.length() > 0) { - req.new_settings.flags |= 2; - req.new_settings.email = email.trim(); - } + req.new_settings.flags |= 2; + req.new_settings.email = email.trim(); } showEditDoneProgress(true, true); Utilities.globalQueue.postRunnable(() -> { @@ -2880,46 +3259,129 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } showEditDoneProgress(true, true); try { - Stripe stripe = new Stripe(stripeApiKey); - stripe.createToken(card, new TokenCallback() { - public void onSuccess(Token token) { - if (canceled) { - return; + if ("stripe".equals(paymentForm.native_provider)) { + Stripe stripe = new Stripe(providerApiKey); + stripe.createToken(card, new TokenCallback() { + public void onSuccess(Token token) { + if (canceled) { + return; + } + paymentJson = String.format(Locale.US, "{\"type\":\"%1$s\", \"id\":\"%2$s\"}", token.getType(), token.getId()); + AndroidUtilities.runOnUIThread(() -> { + goToNextStep(); + showEditDoneProgress(true, false); + setDonePressed(false); + }); } - paymentJson = String.format(Locale.US, "{\"type\":\"%1$s\", \"id\":\"%2$s\"}", token.getType(), token.getId()); - AndroidUtilities.runOnUIThread(() -> { - goToNextStep(); + + public void onError(Exception error) { + if (canceled) { + return; + } showEditDoneProgress(true, false); setDonePressed(false); - }); + if (error instanceof APIConnectionException || error instanceof APIException) { + AlertsCreator.showSimpleToast(PaymentFormActivity.this, LocaleController.getString("PaymentConnectionFailed", R.string.PaymentConnectionFailed)); + } else { + AlertsCreator.showSimpleToast(PaymentFormActivity.this, error.getMessage()); + } + } } + ); + } else if ("smartglocal".equals(paymentForm.native_provider)) { + AsyncTask task = new AsyncTask() { + @Override + protected String doInBackground(Object... objects) { + HttpURLConnection conn = null; + try { + JSONObject jsonObject = new JSONObject(); + JSONObject cardObject = new JSONObject(); + cardObject.put("number", card.getNumber()); + cardObject.put("expiration_month", String.format(Locale.US, "%02d", card.getExpMonth())); + cardObject.put("expiration_year", "" + card.getExpYear()); + cardObject.put("security_code", "" + card.getCVC()); + jsonObject.put("card", cardObject); - public void onError(Exception error) { - if (canceled) { - return; - } - showEditDoneProgress(true, false); - setDonePressed(false); - if (error instanceof APIConnectionException || error instanceof APIException) { - AlertsCreator.showSimpleToast(PaymentFormActivity.this, LocaleController.getString("PaymentConnectionFailed", R.string.PaymentConnectionFailed)); + URL connectionUrl; + if (paymentForm.invoice.test) { + connectionUrl = new URL("https://tgb-playground.smart-glocal.com/cds/v1/tokenize/card"); } else { - AlertsCreator.showSimpleToast(PaymentFormActivity.this, error.getMessage()); + connectionUrl = new URL("https://tgb.smart-glocal.com/cds/v1/tokenize/card"); + } + conn = (HttpURLConnection) connectionUrl.openConnection(); + conn.setConnectTimeout(30 * 1000); + conn.setReadTimeout(80 * 1000); + conn.setUseCaches(false); + conn.setDoOutput(true); + conn.setRequestMethod("POST"); + conn.setRequestProperty("Content-Type", "application/json"); + conn.setRequestProperty("X-PUBLIC-TOKEN", providerApiKey); + + try (OutputStream output = conn.getOutputStream()) { + output.write(jsonObject.toString().getBytes("UTF-8")); + } + + int code = conn.getResponseCode(); + if (code >= 200 && code < 300) { + JSONObject result = new JSONObject(); + JSONObject jsonObject1 = new JSONObject(getResponseBody(conn.getInputStream())); + String token = jsonObject1.getJSONObject("data").getString("token"); + result.put("token", token); + result.put("type", "card"); + return result.toString(); + } else { + if (BuildVars.DEBUG_VERSION) { + FileLog.e("" + getResponseBody(conn.getErrorStream())); + } + } + } catch (Exception e) { + FileLog.e(e); + } finally { + if (conn != null) { + conn.disconnect(); } } + return null; } - ); + + @Override + protected void onPostExecute(String result) { + if (canceled) { + return; + } + if (result == null) { + AlertsCreator.showSimpleToast(PaymentFormActivity.this, LocaleController.getString("PaymentConnectionFailed", R.string.PaymentConnectionFailed)); + } else { + paymentJson = result; + goToNextStep(); + } + showEditDoneProgress(true, false); + setDonePressed(false); + } + }; + task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, null, null, null); + } } catch (Exception e) { FileLog.e(e); } return true; } + private static String getResponseBody(InputStream responseStream) throws IOException { + String rBody = new Scanner(responseStream, "UTF-8") + .useDelimiter("\\A") + .next(); + responseStream.close(); + return rBody; + } + private void sendForm() { if (canceled) { return; } showEditDoneProgress(true, true); validateRequest = new TLRPC.TL_payments_validateRequestedInfo(); + validateRequest.peer = getMessagesController().getInputPeer(messageObject.messageOwner.peer_id); validateRequest.save = saveShippingInfo; validateRequest.msg_id = messageObject.getId(); validateRequest.info = new TLRPC.TL_paymentRequestedInfo(); @@ -3004,33 +3466,6 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen }, ConnectionsManager.RequestFlagFailOnServerErrors); } - private TLRPC.TL_paymentRequestedInfo getRequestInfo() { - TLRPC.TL_paymentRequestedInfo info = new TLRPC.TL_paymentRequestedInfo(); - if (paymentForm.invoice.name_requested) { - info.name = inputFields[FIELD_NAME].getText().toString(); - info.flags |= 1; - } - if (paymentForm.invoice.phone_requested) { - info.phone = "+" + inputFields[FIELD_PHONECODE].getText().toString() + inputFields[FIELD_PHONE].getText().toString(); - info.flags |= 2; - } - if (paymentForm.invoice.email_requested) { - info.email = inputFields[FIELD_EMAIL].getText().toString().trim(); - info.flags |= 4; - } - if (paymentForm.invoice.shipping_address_requested) { - info.shipping_address = new TLRPC.TL_postAddress(); - info.shipping_address.street_line1 = inputFields[FIELD_STREET1].getText().toString(); - info.shipping_address.street_line2 = inputFields[FIELD_STREET2].getText().toString(); - info.shipping_address.city = inputFields[FIELD_CITY].getText().toString(); - info.shipping_address.state = inputFields[FIELD_STATE].getText().toString(); - info.shipping_address.country_iso2 = countryName != null ? countryName : ""; - info.shipping_address.post_code = inputFields[FIELD_POSTCODE].getText().toString(); - info.flags |= 8; - } - return info; - } - private void sendData() { if (canceled) { return; @@ -3038,6 +3473,8 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen showEditDoneProgress(false, true); final TLRPC.TL_payments_sendPaymentForm req = new TLRPC.TL_payments_sendPaymentForm(); req.msg_id = messageObject.getId(); + req.peer = getMessagesController().getInputPeer(messageObject.messageOwner.peer_id); + req.form_id = paymentForm.form_id; if (UserConfig.getInstance(currentAccount).tmpPassword != null && paymentForm.saved_credentials != null) { req.credentials = new TLRPC.TL_inputPaymentCredentialsSaved(); req.credentials.id = paymentForm.saved_credentials.id; @@ -3058,11 +3495,33 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen req.shipping_option_id = shippingOption.id; req.flags |= 2; } + if ((paymentForm.invoice.flags & 256) != 0) { + req.tip_amount = tipAmount != null ? tipAmount : 0; + req.flags |= 4; + } ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> { if (response != null) { if (response instanceof TLRPC.TL_payments_paymentResult) { - MessagesController.getInstance(currentAccount).processUpdates(((TLRPC.TL_payments_paymentResult) response).updates, false); - AndroidUtilities.runOnUIThread(this::goToNextStep); + TLRPC.Updates updates = ((TLRPC.TL_payments_paymentResult) response).updates; + TLRPC.Message[] message = new TLRPC.Message[1]; + for (int a = 0, N = updates.updates.size(); a < N; a++) { + TLRPC.Update update = updates.updates.get(a); + if (update instanceof TLRPC.TL_updateNewMessage) { + message[0] = ((TLRPC.TL_updateNewMessage) update).message; + break; + } else if (update instanceof TLRPC.TL_updateNewChannelMessage) { + message[0] = ((TLRPC.TL_updateNewChannelMessage) update).message; + break; + } + } + getMessagesController().processUpdates(updates, false); + AndroidUtilities.runOnUIThread(() -> { + goToNextStep(); + if (parentFragment instanceof ChatActivity) { + CharSequence info = AndroidUtilities.replaceTags(LocaleController.formatString("PaymentInfoHint", R.string.PaymentInfoHint, totalPrice[0], currentItemName)); + ((ChatActivity) parentFragment).getUndoView().showWithAction(0, UndoView.ACTION_PAYMENT_SUCCESS, info, message[0], null, null); + } + }); } else if (response instanceof TLRPC.TL_payments_paymentVerificationNeeded) { AndroidUtilities.runOnUIThread(() -> { NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.paymentFinished); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java b/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java index abe0c4b6b..a2d5d0d8c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java @@ -481,6 +481,16 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat public final static int SELECT_TYPE_WALLPAPER = 3; public final static int SELECT_TYPE_QR = 10; + private boolean longPressed; + private int rewindCount; + private boolean rewindForward; + private boolean rewindByBackSeek; + private long startRewindFrom; + private Runnable updateRewindRunnable; + private long rewindLastTime; + private long rewindLastUpdatePlayerTime; + private long rewindBackSeekPlayerPosition; + public final Property FLASH_VIEW_VALUE = new AnimationProperties.FloatProperty("flashViewAlpha") { @Override public void setValue(View object, float value) { @@ -750,8 +760,8 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat videoPlayerSeekbar.setProgress(progress); } } else { - if (seekToProgressPending == 0) { - videoPlayerSeekbar.setProgress(progress); + if (seekToProgressPending == 0 && (rewindCount == 0 || !rewindByBackSeek)) { + videoPlayerSeekbar.setProgress(progress, false); } if (bufferedProgress != -1) { videoPlayerSeekbar.setBufferedProgress(bufferedProgress); @@ -1452,16 +1462,16 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat parent.invalidate(); } - public void setBackgroundState(int state, boolean animated) { + public void setBackgroundState(int state, boolean animated, boolean animateIcon) { if (backgroundState == state) { return; } if (playPauseDrawable != null) { - boolean animateIcon = backgroundState == 3 || backgroundState == 4; + boolean animatePlayPause = animateIcon && (backgroundState == 3 || backgroundState == 4); if (state == 3) { - playPauseDrawable.setPause(false, animateIcon); + playPauseDrawable.setPause(false, animatePlayPause); } else if (state == 4) { - playPauseDrawable.setPause(true, animateIcon); + playPauseDrawable.setPause(true, animatePlayPause); } playPauseDrawable.setParent(parent); playPauseDrawable.invalidateSelf(); @@ -3018,9 +3028,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (user != null || chat != null) { ImageLocation location; if (user != null) { - location = ImageLocation.getForUser(user, true); + location = ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_BIG); } else { - location = ImageLocation.getForChat(chat, true); + location = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_BIG); } if (location != null) { imagesArrLocations.add(0, location); @@ -3196,7 +3206,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (finalSize != 0) { requestingPreview = false; photoProgressViews[0].setProgress(1f, true); - photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, true); + photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, true, true); preparePlayer(Uri.fromFile(new File(finalPath)), false, true, editState.savedFilterState); } } @@ -3918,7 +3928,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (avatarsDialogId > 0) { MessagesController.getInstance(currentAccount).deleteUserPhoto(null); } else { - MessagesController.getInstance(currentAccount).changeChatAvatar(-avatarsDialogId, null, null, null, 0, null, null, null); + MessagesController.getInstance(currentAccount).changeChatAvatar(-avatarsDialogId, null, null, null, 0, null, null, null, null); } closePhoto(false, false); } else { @@ -4106,7 +4116,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat inputChatPhoto.id.id = photo.id; inputChatPhoto.id.access_hash = photo.access_hash; inputChatPhoto.id.file_reference = photo.file_reference; - MessagesController.getInstance(currentAccount).changeChatAvatar(-avatarsDialogId, inputChatPhoto, null, null, 0, null, null, null); + MessagesController.getInstance(currentAccount).changeChatAvatar(-avatarsDialogId, inputChatPhoto, null, null, 0, null, null, null, null); chat.photo.dc_id = photo.dc_id; chat.photo.photo_small = smallSize.location; chat.photo.photo_big = bigSize.location; @@ -4352,7 +4362,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } } }; - photoProgressViews[a].setBackgroundState(PROGRESS_EMPTY, false); + photoProgressViews[a].setBackgroundState(PROGRESS_EMPTY, false, true); } miniProgressView = new RadialProgressView(activityContext) { @@ -6669,17 +6679,17 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (videoPlayer.isPlaying() && playbackState != ExoPlayer.STATE_ENDED) { if (!isPlaying) { isPlaying = true; - photoProgressViews[0].setBackgroundState(isCurrentVideo ? PROGRESS_NONE : PROGRESS_PAUSE, false); + photoProgressViews[0].setBackgroundState(isCurrentVideo ? PROGRESS_NONE : PROGRESS_PAUSE, false, true); photoProgressViews[0].setIndexedAlpha(1, !isCurrentVideo && (!isAccessibilityEnabled() || playerWasPlaying) && ((playerAutoStarted && !playerWasPlaying) || !isActionBarVisible) ? 0f : 1f, false); playerWasPlaying = true; AndroidUtilities.runOnUIThread(updateProgressRunnable); } } else if (isPlaying || playbackState == ExoPlayer.STATE_ENDED) { - isPlaying = false; if (currentEditMode != 3) { photoProgressViews[0].setIndexedAlpha(1, 1f, false); - photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, false); + photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, false, isPlaying); } + isPlaying = false; AndroidUtilities.cancelRunOnUIThread(updateProgressRunnable); if (playbackState == ExoPlayer.STATE_ENDED) { if (isCurrentVideo) { @@ -9412,7 +9422,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } for (int a = 0; a < 3; a++) { if (photoProgressViews[a] != null) { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, false); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, false, true); } } if (groupedPhotosListView != null) { @@ -9494,10 +9504,10 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (imageLocation == null && avatarsDialogId != 0) { if (avatarsDialogId > 0) { TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(avatarsDialogId); - imageLocation = ImageLocation.getForUser(user, true); + imageLocation = ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_BIG); } else { TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-avatarsDialogId); - imageLocation = ImageLocation.getForChat(chat, true); + imageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_BIG); } } if (imageLocation == null) { @@ -10740,13 +10750,13 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat MessageObject messageObject = null; if (currentMessageObject != null) { if (index < 0 || index >= imagesArr.size()) { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated, true); return; } messageObject = imagesArr.get(index); canAutoPlay = shouldMessageObjectAutoPlayed(messageObject); if (sharedMediaType == MediaDataController.MEDIA_FILE && !messageObject.canPreviewDocument()) { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated, true); return; } if (!TextUtils.isEmpty(messageObject.messageOwner.attachPath)) { @@ -10764,7 +10774,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } } else if (currentBotInlineResult != null) { if (index < 0 || index >= imagesArrLocals.size()) { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated, true); return; } TLRPC.BotInlineResult botInlineResult = (TLRPC.BotInlineResult) imagesArrLocals.get(index); @@ -10783,14 +10793,14 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat f2 = new File(FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE), currentFileNames[a]); } else if (currentFileLocation != null) { if (index < 0 || index >= imagesArrLocationsVideo.size()) { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated, true); return; } ImageLocation location = imagesArrLocationsVideo.get(index); f1 = FileLoader.getPathToAttach(location.location, getFileLocationExt(location), avatarsDialogId != 0 || isEvent); } else if (currentSecureDocument != null) { if (index < 0 || index >= secureDocuments.size()) { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated, true); return; } SecureDocument location = secureDocuments.get(index); @@ -10832,9 +10842,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if ((f1Final != null || f2Final != null) && (existsFinal || canStreamFinal)) { if (a != 0 || !isPlaying) { if (isVideoFinal && (!canAutoPlayFinal || a == 0 && playerWasPlaying)) { - photoProgressViews[a].setBackgroundState(PROGRESS_PLAY, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_PLAY, animated, true); } else { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated, true); } } if (a == 0) { @@ -10851,12 +10861,12 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } else { if (isVideoFinal) { if (!FileLoader.getInstance(currentAccount).isLoadingFile(currentFileNames[a])) { - photoProgressViews[a].setBackgroundState(PROGRESS_LOAD, false); + photoProgressViews[a].setBackgroundState(PROGRESS_LOAD, false, true); } else { - photoProgressViews[a].setBackgroundState(PROGRESS_CANCEL, false); + photoProgressViews[a].setBackgroundState(PROGRESS_CANCEL, false, true); } } else { - photoProgressViews[a].setBackgroundState(PROGRESS_EMPTY, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_EMPTY, animated, true); } Float progress = ImageLoader.getInstance().getFileProgress(currentFileNames[a]); if (progress == null) { @@ -10879,9 +10889,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } } if (isLocalVideo) { - photoProgressViews[a].setBackgroundState(PROGRESS_PLAY, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_PLAY, animated, true); } else { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, animated, true); } } } @@ -11018,7 +11028,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat imageReceiver.setImage(ImageLocation.getForObject(photo, photoObject), filter, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, imageSize, null, object, cacheType); } else if (webDocument != null) { if (videoThumb != null) { - imageReceiver.setImage(ImageLocation.getForWebFile(webDocument), filter, videoThumb, null, null, object, cacheType); + imageReceiver.setImage(ImageLocation.getForWebFile(webDocument), filter, videoThumb, null, (Drawable) null, object, cacheType); } else { imageReceiver.setImage(ImageLocation.getForWebFile(webDocument), filter, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : (isVideo && parentActivity != null ? parentActivity.getResources().getDrawable(R.drawable.nophotos) : null), null, object, cacheType); } @@ -12400,7 +12410,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } for (int a = 0; a < 3; a++) { if (photoProgressViews[a] != null) { - photoProgressViews[a].setBackgroundState(PROGRESS_NONE, false); + photoProgressViews[a].setBackgroundState(PROGRESS_NONE, false, true); } } requestVideoPreview(0); @@ -12578,6 +12588,14 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat return height; } + float longPressX; + Runnable longPressRunnable = new Runnable() { + @Override + public void run() { + onLongPress(); + } + }; + private boolean onTouchEvent(MotionEvent ev) { if (currentEditMode == 3 && animationStartTime != 0 && (ev.getActionMasked() == MotionEvent.ACTION_DOWN || ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN)) { if (ev.getPointerCount() >= 2) { @@ -12590,6 +12608,14 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat return false; } + if (rewindCount > 0) { + if (ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == MotionEvent.ACTION_CANCEL ) { + cancelRewind(); + return false; + } + return true; + } + if (currentEditMode == 2) { photoFilterView.onTouch(ev); return true; @@ -12672,7 +12698,14 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } } } + if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { + longPressX = ev.getX(); + AndroidUtilities.runOnUIThread(longPressRunnable, 300); + } else { + AndroidUtilities.cancelRunOnUIThread(longPressRunnable); + } } else if (ev.getActionMasked() == MotionEvent.ACTION_MOVE) { + if (canZoom && ev.getPointerCount() == 2 && !draggingDown && zooming && !changingPage) { discardTap = true; if (currentEditMode == 3) { @@ -12714,6 +12747,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (dx > touchSlop || dy > touchSlop) { discardTap = true; hidePressedDrawables(); + AndroidUtilities.cancelRunOnUIThread(longPressRunnable); if (qualityChooseView != null && qualityChooseView.getVisibility() == View.VISIBLE) { return true; } @@ -12779,6 +12813,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } } } else if (ev.getActionMasked() == MotionEvent.ACTION_CANCEL || ev.getActionMasked() == MotionEvent.ACTION_UP || ev.getActionMasked() == MotionEvent.ACTION_POINTER_UP) { + AndroidUtilities.cancelRunOnUIThread(longPressRunnable); if (paintViewTouched == 1) { if (photoPaintView != null) { MotionEvent event = MotionEvent.obtain(ev); @@ -12999,6 +13034,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat onActionClick(true); checkProgress(0, false, true); } + checkFullscreenButton(); } private boolean shouldMessageObjectAutoPlayed(MessageObject messageObject) { @@ -13775,11 +13811,172 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat return false; } + private final Runnable backSeek = new Runnable() { + @Override + public void run() { + long duration = videoPlayer.getDuration(); + if (duration == 0 || duration == C.TIME_UNSET) { + rewindLastTime = System.currentTimeMillis(); + return; + } + + long t = System.currentTimeMillis(); + long dt = t - rewindLastTime; + rewindLastTime = t; + if (rewindCount == 1) { + dt *= 3; + } else if (rewindCount == 2) { + dt *= 6; + } else { + dt *= 12; + } + if (rewindForward) { + rewindBackSeekPlayerPosition += dt; + } else { + rewindBackSeekPlayerPosition -= dt; + } + if (rewindBackSeekPlayerPosition < 0) { + rewindBackSeekPlayerPosition = 0; + } else if (rewindBackSeekPlayerPosition > duration) { + rewindBackSeekPlayerPosition = duration; + } + if (rewindByBackSeek && videoPlayer != null && rewindLastTime - rewindLastUpdatePlayerTime > 350) { + rewindLastUpdatePlayerTime = rewindLastTime; + videoPlayer.seekTo(rewindBackSeekPlayerPosition); + } + + if (videoPlayer != null) { + long timeDiff = rewindBackSeekPlayerPosition - startRewindFrom; + videoForwardDrawable.setTime(Math.abs(timeDiff)); + if (rewindByBackSeek) { + videoPlayerSeekbar.setProgress(rewindBackSeekPlayerPosition / (float) videoPlayer.getDuration()); + videoPlayerSeekbarView.invalidate(); + } + } + + if (rewindBackSeekPlayerPosition == 0 || rewindBackSeekPlayerPosition >= duration) { + if (rewindByBackSeek && videoPlayer != null) { + rewindLastUpdatePlayerTime = rewindLastTime; + videoPlayer.seekTo(rewindBackSeekPlayerPosition); + } + cancelRewind(); + onTouchEvent(MotionEvent.obtain(0, 0, MotionEvent.ACTION_CANCEL, 0, 0, 0)); + } + if (rewindCount > 0) { + AndroidUtilities.runOnUIThread(backSeek, 16); + } + } + }; + @Override - public void onLongPress(MotionEvent e) { + public void onLongPress(MotionEvent ev) { } + public void onLongPress() { + longPressed = true; + if (videoPlayer != null && videoPlayerControlVisible) { + long current = videoPlayer.getCurrentPosition(); + long total = videoPlayer.getDuration(); + if (current == C.TIME_UNSET || total < 15 * 1000) { + return; + } + float x = longPressX; + int width = getContainerViewWidth(); + boolean forward; + if (x >= width / 3 * 2) { + forward = true; + } else if (x < width / 3) { + forward = false; + } else { + return; + } + rewindForward = forward; + cancelRewind(); + incrementRewindCount(); + } + } + + private void cancelRewind() { + if (rewindCount != 0) { + rewindCount = 0; + + if (videoPlayer != null) { + if (rewindByBackSeek) { + videoPlayer.seekTo(rewindBackSeekPlayerPosition); + } else { + long current = videoPlayer.getCurrentPosition(); + videoPlayer.seekTo(current); + } + videoPlayer.setPlaybackSpeed(1); + } + } + AndroidUtilities.cancelRunOnUIThread(backSeek); + + if (updateRewindRunnable != null) { + AndroidUtilities.cancelRunOnUIThread(updateRewindRunnable); + updateRewindRunnable = null; + } + + videoForwardDrawable.setShowing(false); + } + + void incrementRewindCount() { + if (videoPlayer == null) { + return; + } + rewindCount++; + boolean needUpdate = false; + if (rewindCount == 1) { + if (rewindForward && videoPlayer.isPlaying()) { + rewindByBackSeek = false; + } else { + rewindByBackSeek = true; + } + } + if (rewindForward && !rewindByBackSeek) { + if (rewindCount == 1) { + videoPlayer.setPlaybackSpeed(4); + needUpdate = true; + } else if (rewindCount == 2) { + videoPlayer.setPlaybackSpeed(7); + needUpdate = true; + } else { + videoPlayer.setPlaybackSpeed(13); + } + } else { + if (rewindCount == 1 || rewindCount == 2) { + needUpdate = true; + } + } + + + if (rewindCount == 1) { + rewindBackSeekPlayerPosition = videoPlayer.getCurrentPosition(); + rewindLastTime = System.currentTimeMillis(); + rewindLastUpdatePlayerTime = rewindLastTime; + startRewindFrom = videoPlayer.getCurrentPosition(); + videoForwardDrawable.setOneShootAnimation(false); + videoForwardDrawable.setLeftSide(!rewindForward); + videoForwardDrawable.setShowing(true); + containerView.invalidate(); + } + + AndroidUtilities.cancelRunOnUIThread(backSeek); + AndroidUtilities.runOnUIThread(backSeek); + + if (needUpdate) { + if (updateRewindRunnable != null) { + AndroidUtilities.cancelRunOnUIThread(updateRewindRunnable); + } + AndroidUtilities.runOnUIThread(updateRewindRunnable = () -> { + updateRewindRunnable = null; + incrementRewindCount(); + }, 2000); + } + } + + @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (scale != 1) { @@ -13913,6 +14110,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat current = 0; } if (apply) { + videoForwardDrawable.setOneShootAnimation(true); videoForwardDrawable.setLeftSide(x < width / 3); videoForwardDrawable.addTime(10000); videoPlayer.seekTo(current); @@ -14251,7 +14449,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (resultHeight == originalHeight && resultWidth == originalWidth) { tryStartRequestPreviewOnFinish = false; photoProgressViews[0].setProgress(0,photoProgressViews[0].backgroundState == 0 || photoProgressViews[0].previousBackgroundState == 0); - photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, false); + photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, false, true); if (!wasRequestingPreview) { preparePlayer(currentPlayingVideoFile, false, false, editState.savedFilterState); videoPlayer.seekTo((long) (videoTimelineView.getLeftProgress() * videoDuration)); @@ -14299,11 +14497,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat requestingPreview = true; photoProgressViews[0].setProgress(0,photoProgressViews[0].backgroundState == 0 || photoProgressViews[0].previousBackgroundState == 0); - photoProgressViews[0].setBackgroundState(PROGRESS_EMPTY, false); + photoProgressViews[0].setBackgroundState(PROGRESS_EMPTY, false, true); } } else { tryStartRequestPreviewOnFinish = false; - photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, false); + photoProgressViews[0].setBackgroundState(PROGRESS_PLAY, false, true); if (request == 2) { preparePlayer(currentPlayingVideoFile, false, false, editState.savedFilterState); videoPlayer.seekTo((long) (videoTimelineView.getLeftProgress() * videoDuration)); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PinchToZoomHelper.java b/TMessagesProj/src/main/java/org/telegram/ui/PinchToZoomHelper.java new file mode 100644 index 000000000..71cfe9f19 --- /dev/null +++ b/TMessagesProj/src/main/java/org/telegram/ui/PinchToZoomHelper.java @@ -0,0 +1,708 @@ +package org.telegram.ui; + +import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; +import android.animation.ValueAnimator; +import android.annotation.TargetApi; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Outline; +import android.graphics.Paint; +import android.graphics.Path; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffXfermode; +import android.graphics.RectF; +import android.graphics.drawable.Drawable; +import android.os.Build; +import android.view.Gravity; +import android.view.MotionEvent; +import android.view.TextureView; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewOutlineProvider; +import android.widget.FrameLayout; + +import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; + +import org.telegram.messenger.AndroidUtilities; +import org.telegram.messenger.FileLoader; +import org.telegram.messenger.ImageLocation; +import org.telegram.messenger.ImageReceiver; +import org.telegram.messenger.MediaController; +import org.telegram.messenger.MessageObject; +import org.telegram.messenger.R; +import org.telegram.messenger.WebFile; +import org.telegram.tgnet.TLRPC; +import org.telegram.ui.Components.AnimatedFileDrawable; +import org.telegram.ui.Components.BackupImageView; +import org.telegram.ui.Components.CubicBezierInterpolator; +import org.telegram.ui.Components.LayoutHelper; + +public class PinchToZoomHelper { + + private final ViewGroup parentView; + + private ZoomOverlayView overlayView; + private View child; + private ImageReceiver childImage; + + private ImageReceiver fullImage = new ImageReceiver(); + + private boolean inOverlayMode; + + float parentOffsetX; + float parentOffsetY; + + float pinchCenterX; + float pinchCenterY; + + private float imageX; + private float imageY; + private float imageHeight; + private float imageWidth; + + private float fullImageHeight; + private float fullImageWidth; + + private float finishProgress; + private float progressToFullView; + ValueAnimator finishTransition; + private MessageObject messageObject; + + Callback callback; + ClipBoundsListener clipBoundsListener; + + float pinchStartCenterX; + float pinchStartCenterY; + float pinchStartDistance; + float pinchTranslationX; + float pinchTranslationY; + boolean isInPinchToZoomTouchMode; + + private int pointerId1, pointerId2; + + float pinchScale; + + private float enterProgress; + private float[] clipTopBottom = new float[2]; + + private boolean isHardwareVideo; + + public PinchToZoomHelper(ViewGroup parentView) { + this.parentView = parentView; + } + + public void startZoom(View child, ImageReceiver image, MessageObject messageObject) { + this.child = child; + this.messageObject = messageObject; + + if (overlayView == null) { + overlayView = new ZoomOverlayView(parentView.getContext()); + overlayView.setFocusable(false); + overlayView.setFocusableInTouchMode(false); + overlayView.setEnabled(false); + } + + if (fullImage == null) { + fullImage = new ImageReceiver(); + fullImage.setCrossfadeAlpha((byte) 2); + fullImage.setCrossfadeWithOldImage(false); + fullImage.onAttachedToWindow(); + } + + inOverlayMode = true; + parentView.addView(overlayView); + finishProgress = 1f; + progressToFullView = 0f; + + setFullImage(messageObject); + + imageX = image.getImageX(); + imageY = image.getImageY(); + imageHeight = image.getImageHeight(); + imageWidth = image.getImageWidth(); + fullImageHeight = image.getBitmapHeight(); + fullImageWidth = image.getBitmapWidth(); + + if (fullImageHeight / fullImageWidth != imageHeight / imageWidth) { + if (fullImageHeight / fullImageWidth < imageHeight / imageWidth) { + fullImageWidth = fullImageWidth / fullImageHeight * imageHeight; + fullImageHeight = imageHeight; + } else { + fullImageHeight = fullImageHeight / fullImageWidth * imageWidth; + fullImageWidth = imageWidth; + } + } else { + fullImageHeight = imageHeight; + fullImageWidth = imageWidth; + } + + + if (messageObject != null && messageObject.isVideo() && MediaController.getInstance().isPlayingMessage(messageObject)) { + isHardwareVideo = true; + MediaController.getInstance().setTextureView(overlayView.videoTextureView, overlayView.aspectRatioFrameLayout, overlayView.videoPlayerContainer, true); + FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) overlayView.videoPlayerContainer.getLayoutParams(); + overlayView.videoPlayerContainer.setTag(R.id.parent_tag, image); + if (layoutParams.width != image.getImageWidth() || layoutParams.height != image.getImageHeight()) { + overlayView.aspectRatioFrameLayout.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FILL); + layoutParams.width = (int) image.getImageWidth(); + layoutParams.height = (int) image.getImageHeight(); + overlayView.videoPlayerContainer.setLayoutParams(layoutParams); + } + overlayView.videoTextureView.setScaleX(1f); + overlayView.videoTextureView.setScaleY(1f); + + if (callback != null) { + overlayView.backupImageView.setImageBitmap(callback.getCurrentTextureView().getBitmap((int) fullImageWidth, (int) fullImageHeight)); + overlayView.backupImageView.setSize((int) fullImageWidth, (int) fullImageHeight); + overlayView.backupImageView.getImageReceiver().setRoundRadius(image.getRoundRadius()); + } + overlayView.videoPlayerContainer.setVisibility(View.VISIBLE); + } else { + isHardwareVideo = false; + this.childImage = new ImageReceiver(); + this.childImage.onAttachedToWindow(); + Drawable drawable = image.getDrawable(); + this.childImage.setImageBitmap(drawable); + if (drawable instanceof AnimatedFileDrawable) { + ((AnimatedFileDrawable) drawable).addSecondParentView(overlayView); + ((AnimatedFileDrawable) drawable).setInvalidateParentViewWithSecond(true); + } + this.childImage.setImageCoords(imageX, imageY, imageWidth, imageHeight); + this.childImage.setRoundRadius(image.getRoundRadius()); + + this.fullImage.setRoundRadius(image.getRoundRadius()); + overlayView.videoPlayerContainer.setVisibility(View.GONE); + } + + if (callback != null) { + callback.onZoomStarted(messageObject); + } + enterProgress = 0f; + } + + private void setFullImage(MessageObject messageObject) { + if (messageObject == null) { + return; + } + if (!messageObject.isPhoto()) { + return; + } + int[] size = new int[1]; + ImageLocation imageLocation = getImageLocation(messageObject, size); + if (imageLocation != null) { + boolean cacheOnly = messageObject != null && messageObject.isWebpage(); + Object parentObject; + parentObject = messageObject; + + String filter = null; + fullImage.setImage(imageLocation, filter, null, null, null, size[0], null, parentObject, cacheOnly ? 1 : 0); + fullImage.setCrossfadeAlpha((byte) 2); + } + + updateViewsLocation(); + } + + private boolean updateViewsLocation() { + float parentOffsetX = 0; + float parentOffsetY = 0; + View currentView = child; + while (currentView != parentView) { + if (currentView == null) { + return false; + } + parentOffsetX += currentView.getLeft(); + parentOffsetY += currentView.getTop(); + currentView = (View) currentView.getParent(); + } + + this.parentOffsetX = parentOffsetX; + this.parentOffsetY = parentOffsetY; + return true; + } + + public void finishZoom() { + if (finishTransition != null || !inOverlayMode) { + return; + } + if (!updateViewsLocation()) { + clear(); + } + finishTransition = ValueAnimator.ofFloat(1f, 0); + finishTransition.addUpdateListener(valueAnimator -> { + finishProgress = (float) valueAnimator.getAnimatedValue(); + invalidateViews(); + }); + finishTransition.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + if (finishTransition != null) { + finishTransition = null; + clear(); + } + } + }); +// finishTransition.setDuration(350); +// finishTransition.setInterpolator(new OvershootInterpolator(1.05f)); + + finishTransition.setDuration(220); + finishTransition.setInterpolator(CubicBezierInterpolator.DEFAULT); + finishTransition.start(); + } + + public void clear() { + if (inOverlayMode) { + if (callback != null) { + callback.onZoomFinished(messageObject); + } + inOverlayMode = false; + } + if (overlayView != null && overlayView.getParent() != null) { + parentView.removeView(overlayView); + overlayView.backupImageView.getImageReceiver().clearImage(); + + if (childImage != null) { + Drawable drawable = this.childImage.getDrawable(); + if (drawable instanceof AnimatedFileDrawable) { + ((AnimatedFileDrawable) drawable).removeSecondParentView(overlayView); + } + } + } + if (child != null) { + child.invalidate(); + child = null; + } + if (childImage != null) { + this.childImage.onDetachedFromWindow(); + this.childImage.clearImage(); + this.childImage = null; + } + if (fullImage != null) { + fullImage.onDetachedFromWindow(); + fullImage.clearImage(); + fullImage = null; + } + + messageObject = null; + } + + public boolean inOverlayMode() { + return inOverlayMode; + } + + + public boolean isInOverlayMode() { + return inOverlayMode; + } + + public boolean isInOverlayModeFor(View child) { + return inOverlayMode && child == this.child; + } + + public boolean onTouchEvent(MotionEvent ev) { + if (updateViewsLocation() && child != null) { + ev.offsetLocation(-parentOffsetX, -parentOffsetY); + return child.onTouchEvent(ev); + } + return false; + } + + public Bitmap getVideoBitmap(int w, int h) { + if (overlayView == null) { + return null; + } + return overlayView.videoTextureView.getBitmap(w, h); + } + + public ImageReceiver getPhotoImage() { + return childImage; + } + + protected boolean zoomEnabled(View child, ImageReceiver receiver) { + Drawable drawable = receiver.getDrawable(); + if (drawable instanceof AnimatedFileDrawable) { + if (((AnimatedFileDrawable)receiver.getDrawable()).isLoadingStream()) { + return false; + } else { + return true; + } + } + return receiver.hasNotThumb(); + } + + + private class ZoomOverlayView extends FrameLayout { + + private FrameLayout videoPlayerContainer; + private TextureView videoTextureView; + private AspectRatioFrameLayout aspectRatioFrameLayout; + private BackupImageView backupImageView; + private Path aspectPath = new Path(); + private Paint aspectPaint = new Paint(Paint.ANTI_ALIAS_FLAG); + + public ZoomOverlayView(Context context) { + super(context); + + if (Build.VERSION.SDK_INT >= 21) { + videoPlayerContainer = new FrameLayout(context); + videoPlayerContainer.setOutlineProvider(new ViewOutlineProvider() { + + @TargetApi(Build.VERSION_CODES.LOLLIPOP) + @Override + public void getOutline(View view, Outline outline) { + ImageReceiver imageReceiver = (ImageReceiver) view.getTag(R.id.parent_tag); + if (imageReceiver != null) { + int[] rad = imageReceiver.getRoundRadius(); + int maxRad = 0; + for (int a = 0; a < 4; a++) { + maxRad = Math.max(maxRad, rad[a]); + } + outline.setRoundRect(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight(), maxRad); + } else { + outline.setOval(0, 0, AndroidUtilities.roundMessageSize, AndroidUtilities.roundMessageSize); + } + } + }); + videoPlayerContainer.setClipToOutline(true); + } else { + videoPlayerContainer = new FrameLayout(context) { + + RectF rect = new RectF(); + + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + super.onSizeChanged(w, h, oldw, oldh); + aspectPath.reset(); + ImageReceiver imageReceiver = (ImageReceiver) getTag(R.id.parent_tag); + if (imageReceiver != null) { + int[] rad = imageReceiver.getRoundRadius(); + int maxRad = 0; + for (int a = 0; a < 4; a++) { + maxRad = Math.max(maxRad, rad[a]); + } + rect.set(0, 0, w, h); + aspectPath.addRoundRect(rect, AndroidUtilities.dp(4), AndroidUtilities.dp(4), Path.Direction.CW); + } else { + aspectPath.addCircle(w / 2, h / 2, w / 2, Path.Direction.CW); + } + aspectPath.toggleInverseFillType(); + } + + @Override + public void setVisibility(int visibility) { + super.setVisibility(visibility); + if (visibility == VISIBLE) { + setLayerType(View.LAYER_TYPE_HARDWARE, null); + } + } + + @Override + protected void dispatchDraw(Canvas canvas) { + super.dispatchDraw(canvas); + if (getTag() == null) { + canvas.drawPath(aspectPath, aspectPaint); + } + } + }; + aspectPath = new Path(); + aspectPaint = new Paint(Paint.ANTI_ALIAS_FLAG); + aspectPaint.setColor(0xff000000); + aspectPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR)); + } + + backupImageView = new BackupImageView(context); + videoPlayerContainer.addView(backupImageView); + + videoPlayerContainer.setWillNotDraw(false); + + aspectRatioFrameLayout = new AspectRatioFrameLayout(context); + aspectRatioFrameLayout.setBackgroundColor(0); + videoPlayerContainer.addView(aspectRatioFrameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.CENTER)); + + videoTextureView = new TextureView(context); + videoTextureView.setOpaque(false); + aspectRatioFrameLayout.addView(videoTextureView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); + + addView(videoPlayerContainer, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT)); + setWillNotDraw(false); + // videoTextureView.setVisibility(GONE); + } + + + @Override + protected void dispatchDraw(Canvas canvas) { + if (finishTransition == null && enterProgress != 1f) { + enterProgress += 16f / 220; + if (enterProgress > 1f) { + enterProgress = 1f; + } else { + invalidateViews(); + } + } + + float progress = finishProgress * CubicBezierInterpolator.DEFAULT.getInterpolation(enterProgress); + float clipTop = 0; + float clipBottom = getMeasuredHeight(); + if (progress != 1f && clipBoundsListener != null) { + clipBoundsListener.getClipTopBottom(clipTopBottom); + canvas.save(); + clipTop = clipTopBottom[0] * (1f - progress); + clipBottom = clipTopBottom[1] * (1f - progress) + getMeasuredHeight() * progress; + canvas.clipRect(0, clipTop, getMeasuredWidth(), clipBottom); + drawImage(canvas); + super.dispatchDraw(canvas); + canvas.restore(); + } else { + drawImage(canvas); + super.dispatchDraw(canvas); + } + + float parentOffsetX = PinchToZoomHelper.this.parentOffsetX - getLeft(); + float parentOffsetY = PinchToZoomHelper.this.parentOffsetY - getTop(); + + drawOverlays(canvas, (1f - progress), parentOffsetX, parentOffsetY, clipTop, clipBottom); + } + + private void drawImage(Canvas canvas) { + if (!inOverlayMode || child == null || parentView == null) { + return; + } + + updateViewsLocation(); + + float parentOffsetX = PinchToZoomHelper.this.parentOffsetX - getLeft(); + float parentOffsetY = PinchToZoomHelper.this.parentOffsetY - getTop(); + + canvas.save(); + float s = pinchScale * finishProgress + 1f * 1f - finishProgress; + canvas.scale(s, s, parentOffsetX + pinchCenterX, parentOffsetY + pinchCenterY); + canvas.translate(parentOffsetX + pinchTranslationX * finishProgress, parentOffsetY + pinchTranslationY * finishProgress); + if (fullImage != null && fullImage.hasNotThumb()) { + if (progressToFullView != 1) { + progressToFullView += 16f / 150f; + if (progressToFullView > 1) { + progressToFullView = 1f; + } else { + invalidateViews(); + } + } + fullImage.setAlpha(progressToFullView); + } + + float x = imageX; + float y = imageY; + if (imageHeight != fullImageHeight || imageWidth != fullImageWidth) { + float p; + if (s < 1f) { + p = 0; + } else if (s < 1.4f) { + p = (s - 1f) / 0.4f; + } else { + p = 1f; + } + float verticalPadding = (fullImageHeight - imageHeight) / 2f; + float horizontalPadding = (fullImageWidth - imageWidth) / 2f; + x = imageX - horizontalPadding * p; + y = imageY - verticalPadding * p; + if (childImage != null) { + childImage.setImageCoords(x, y, imageWidth + horizontalPadding * p * 2, imageHeight + verticalPadding * p * 2); + } + } + + if (!isHardwareVideo) { + if (childImage != null) { + if (progressToFullView != 1f) { + childImage.draw(canvas); + fullImage.setImageCoords(childImage.getImageX(), childImage.getImageY(), childImage.getImageWidth(), childImage.getImageHeight()); + fullImage.draw(canvas); + } else { + fullImage.setImageCoords(childImage.getImageX(), childImage.getImageY(), childImage.getImageWidth(), childImage.getImageHeight()); + fullImage.draw(canvas); + } + } + } else { + videoPlayerContainer.setPivotX(pinchCenterX - imageX); + videoPlayerContainer.setPivotY(pinchCenterY - imageY); + + videoPlayerContainer.setScaleY(s); + videoPlayerContainer.setScaleX(s); + + videoPlayerContainer.setTranslationX(x + parentOffsetX + pinchTranslationX * s * finishProgress); + videoPlayerContainer.setTranslationY(y + parentOffsetY + pinchTranslationY* s * finishProgress); + } + + canvas.restore(); + } + } + + protected void drawOverlays(Canvas canvas, float alpha, float parentOffsetX, float parentOffsetY, float clipTop, float clipBottom) { + + } + + private ImageLocation getImageLocation(MessageObject message, int[] size) { + if (message.messageOwner instanceof TLRPC.TL_messageService) { + if (message.messageOwner.action instanceof TLRPC.TL_messageActionUserUpdatedPhoto) { + return null; + } else { + TLRPC.PhotoSize sizeFull = FileLoader.getClosestPhotoSizeWithSize(message.photoThumbs, AndroidUtilities.getPhotoSize()); + if (sizeFull != null) { + if (size != null) { + size[0] = sizeFull.size; + if (size[0] == 0) { + size[0] = -1; + } + } + return ImageLocation.getForObject(sizeFull, message.photoThumbsObject); + } else if (size != null) { + size[0] = -1; + } + } + } else if (message.messageOwner.media instanceof TLRPC.TL_messageMediaPhoto && message.messageOwner.media.photo != null || message.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && message.messageOwner.media.webpage != null) { + if (message.isGif()) { + return ImageLocation.getForDocument(message.getDocument()); + } else { + TLRPC.PhotoSize sizeFull = FileLoader.getClosestPhotoSizeWithSize(message.photoThumbs, AndroidUtilities.getPhotoSize(), false, null, true); + if (sizeFull != null) { + if (size != null) { + size[0] = sizeFull.size; + if (size[0] == 0) { + size[0] = -1; + } + } + return ImageLocation.getForObject(sizeFull, message.photoThumbsObject); + } else if (size != null) { + size[0] = -1; + } + } + } else if (message.messageOwner.media instanceof TLRPC.TL_messageMediaInvoice) { + return ImageLocation.getForWebFile(WebFile.createWithWebDocument(((TLRPC.TL_messageMediaInvoice) message.messageOwner.media).photo)); + } else if (message.getDocument() != null) { + TLRPC.Document document = message.getDocument(); + if (MessageObject.isDocumentHasThumb(message.getDocument())) { + TLRPC.PhotoSize thumb = FileLoader.getClosestPhotoSizeWithSize(document.thumbs, 90); + if (size != null) { + size[0] = thumb.size; + if (size[0] == 0) { + size[0] = -1; + } + } + return ImageLocation.getForDocument(thumb, document); + } + } + return null; + } + + public void setClipBoundsListener(ClipBoundsListener clipBoundsListener) { + this.clipBoundsListener = clipBoundsListener; + } + + public interface Callback { + default TextureView getCurrentTextureView() { + return null; + } + default void onZoomStarted(MessageObject messageObject) { + + } + default void onZoomFinished(MessageObject messageObject) { + + } + + } + + public void setCallback(Callback callback) { + this.callback = callback; + } + + public interface ClipBoundsListener { + void getClipTopBottom(float[] topBottom); + } + + public boolean checkPinchToZoom(MotionEvent ev, View child, ImageReceiver image, MessageObject messageObject) { + if (!zoomEnabled(child, image)) { + return false; + } + if (ev.getActionMasked() == MotionEvent.ACTION_DOWN || ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { + if (!isInPinchToZoomTouchMode && ev.getPointerCount() == 2) { + pinchStartDistance = (float) Math.hypot(ev.getX(1) - ev.getX(0), ev.getY(1) - ev.getY(0)); + pinchStartCenterX = pinchCenterX = (ev.getX(0) + ev.getX(1)) / 2.0f; + pinchStartCenterY = pinchCenterY = (ev.getY(0) + ev.getY(1)) / 2.0f; + pinchScale = 1f; + + pointerId1 = ev.getPointerId(0); + pointerId2 = ev.getPointerId(1); + isInPinchToZoomTouchMode = true; + } + } else if (ev.getActionMasked() == MotionEvent.ACTION_MOVE && isInPinchToZoomTouchMode) { + int index1 = -1; + int index2 = -1; + for (int i = 0; i < ev.getPointerCount(); i++) { + if (pointerId1 == ev.getPointerId(i)) { + index1 = i; + } + if (pointerId2 == ev.getPointerId(i)) { + index2 = i; + } + } + if (index1 == -1 || index2 == -1) { + isInPinchToZoomTouchMode = false; + child.getParent().requestDisallowInterceptTouchEvent(false); + finishZoom(); + return false; + } + pinchScale = (float) Math.hypot(ev.getX(index2) - ev.getX(index1), ev.getY(index2) - ev.getY(index1)) / pinchStartDistance; + if (pinchScale > 1.005f && !isInOverlayMode()) { + pinchStartDistance = (float) Math.hypot(ev.getX(index2) - ev.getX(index1), ev.getY(index2) - ev.getY(index1)); + pinchStartCenterX = pinchCenterX = (ev.getX(index1) + ev.getX(index2)) / 2.0f; + pinchStartCenterY = pinchCenterY = (ev.getY(index1) + ev.getY(index2)) / 2.0f; + pinchScale = 1f; + pinchTranslationX = 0f; + pinchTranslationY = 0f; + child.getParent().requestDisallowInterceptTouchEvent(true); + startZoom(child, image, messageObject); + + } + + float newPinchCenterX = (ev.getX(index1) + ev.getX(index2)) / 2.0f; + float newPinchCenterY = (ev.getY(index1) + ev.getY(index2)) / 2.0f; + + + + float moveDx = pinchStartCenterX - newPinchCenterX; + float moveDy = pinchStartCenterY - newPinchCenterY; + pinchTranslationX = -moveDx / pinchScale; + pinchTranslationY = -moveDy / pinchScale; + invalidateViews(); + } else if ((ev.getActionMasked() == MotionEvent.ACTION_UP || (ev.getActionMasked() == MotionEvent.ACTION_POINTER_UP && checkPointerIds(ev)) || ev.getActionMasked() == MotionEvent.ACTION_CANCEL) && isInPinchToZoomTouchMode) { + isInPinchToZoomTouchMode = false; + child.getParent().requestDisallowInterceptTouchEvent(false); + finishZoom(); + } + return isInOverlayModeFor(child); + } + + private boolean checkPointerIds(MotionEvent ev) { + if (ev.getPointerCount() < 2) { + return false; + } + if (pointerId1 == ev.getPointerId(0) && pointerId2 == ev.getPointerId(1)) { + return true; + } + + if (pointerId1 == ev.getPointerId(1) && pointerId2 == ev.getPointerId(0)) { + return true; + } + + return false; + } + + protected void invalidateViews() { + if (overlayView != null) { + overlayView.invalidate(); + } + } + + public View getChild() { + return child; + } +} diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PopupNotificationActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/PopupNotificationActivity.java index f9677b3b0..fcb1a681a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PopupNotificationActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PopupNotificationActivity.java @@ -1372,7 +1372,7 @@ public class PopupNotificationActivity extends Activity implements NotificationC currentChat = chat; if (avatarImageView != null) { AvatarDrawable avatarDrawable = new AvatarDrawable(currentChat); - avatarImageView.setImage(ImageLocation.getForChat(chat, false), "50_50", avatarDrawable, chat); + avatarImageView.setImage(ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, chat); } } else if (currentUser != null) { TLRPC.User user = MessagesController.getInstance(currentMessageObject.currentAccount).getUser(currentUser.id); @@ -1382,7 +1382,7 @@ public class PopupNotificationActivity extends Activity implements NotificationC currentUser = user; if (avatarImageView != null) { AvatarDrawable avatarDrawable = new AvatarDrawable(currentUser); - avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); + avatarImageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user); } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PrivacySettingsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/PrivacySettingsActivity.java index 75a1f505e..21b434618 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PrivacySettingsActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PrivacySettingsActivity.java @@ -41,6 +41,8 @@ import org.telegram.ui.Cells.TextCheckCell; import org.telegram.ui.Cells.TextInfoPrivacyCell; import org.telegram.ui.Cells.TextSettingsCell; import org.telegram.ui.Components.AlertsCreator; +import org.telegram.ui.Components.Bulletin; +import org.telegram.ui.Components.BulletinFactory; import org.telegram.ui.Components.LayoutHelper; import org.telegram.ui.Components.RecyclerListView; @@ -447,6 +449,17 @@ public class PrivacySettingsActivity extends BaseFragment implements Notificatio getConnectionsManager().sendRequest(req, (response, error) -> { }); + String text; + if (clear[0] && clear[1]) { + text = LocaleController.getString("PrivacyPaymentsPaymentShippingCleared", R.string.PrivacyPaymentsPaymentShippingCleared); + } else if (clear[0]) { + text = LocaleController.getString("PrivacyPaymentsShippingInfoCleared", R.string.PrivacyPaymentsShippingInfoCleared); + } else if (clear[1]) { + text = LocaleController.getString("PrivacyPaymentsPaymentInfoCleared", R.string.PrivacyPaymentsPaymentInfoCleared); + } else { + return; + } + BulletinFactory.of(PrivacySettingsActivity.this).createSimpleBulletin(R.raw.chats_infotip, text).show(); }); builder1.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); showDialog(builder1.create()); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java index bb4b9e885..59d2263be 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java @@ -13,9 +13,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; -import android.animation.StateListAnimator; import android.animation.ValueAnimator; -import android.annotation.SuppressLint; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; @@ -25,9 +23,9 @@ import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.database.DataSetObserver; +import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; -import android.graphics.Outline; import android.graphics.Paint; import android.graphics.Point; import android.graphics.PorterDuff; @@ -57,7 +55,6 @@ import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; import android.view.ViewGroup; -import android.view.ViewOutlineProvider; import android.view.ViewTreeObserver; import android.view.WindowManager; import android.view.accessibility.AccessibilityNodeInfo; @@ -310,6 +307,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. private TLRPC.FileLocation avatar; private TLRPC.FileLocation avatarBig; + private ImageLocation uploadingImageLocation; private final static int add_contact = 1; private final static int block_contact = 2; @@ -410,6 +408,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. private boolean firstLayout = true; private boolean invalidateScroll = true; + PinchToZoomHelper pinchToZoomHelper; + private final Property HEADER_SHADOW = new AnimationProperties.FloatProperty("headerShadow") { @Override public void setValue(ProfileActivity object, float value) { @@ -588,7 +588,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. public void invalidate() { super.invalidate(); if (avatarsViewPager != null) { - BackupImageView imageView = avatarsViewPager.getCurrentItemView(); avatarsViewPager.invalidate(); } } @@ -1389,10 +1388,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. listAdapter.notifyDataSetChanged(); } - if (arguments.containsKey("nearby_distance")) { - getMessagesController().preloadGreetingsSticker(); - } - if (arguments.containsKey("preload_messages")) { getMessagesController().ensureMessagesLoaded(user_id, 0, null); } @@ -1440,6 +1435,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. if (imageUpdater != null) { imageUpdater.clear(); } + if (pinchToZoomHelper != null) { + pinchToZoomHelper.clear(); + } } @Override @@ -1959,6 +1957,14 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. fragmentView = new NestedFrameLayout(context) { + @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + if (pinchToZoomHelper.isInOverlayMode()) { + return pinchToZoomHelper.onTouchEvent(ev); + } + return super.dispatchTouchEvent(ev); + } + private boolean ignoreLayout; private Paint grayPaint = new Paint(); @@ -2264,6 +2270,14 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. } } } + + @Override + protected boolean drawChild(Canvas canvas, View child, long drawingTime) { + if (pinchToZoomHelper.isInOverlayMode() && (child == avatarContainer2 || child == actionBar || child == writeButton)) { + return true; + } + return super.drawChild(canvas, child, drawingTime); + } }; fragmentView.setWillNotDraw(false); FrameLayout frameLayout = (FrameLayout) fragmentView; @@ -2652,7 +2666,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. BuildVars.DEBUG_VERSION && !AndroidUtilities.isTablet() && Build.VERSION.SDK_INT >= 23 ? (SharedConfig.smoothKeyboard ? LocaleController.getString("DebugMenuDisableSmoothKeyboard", R.string.DebugMenuDisableSmoothKeyboard) : LocaleController.getString("DebugMenuEnableSmoothKeyboard", R.string.DebugMenuEnableSmoothKeyboard)) : null, BuildVars.DEBUG_PRIVATE_VERSION ? (SharedConfig.disableVoiceAudioEffects ? "Enable voip audio effects" : "Disable voip audio effects") : null, Build.VERSION.SDK_INT >= 21 ? (SharedConfig.noStatusBar ? "Show status bar background" : "Hide status bar background") : null, - SharedConfig.useMediaStream ? "Use call stream in voice chats" : "User media stream in voice chats" + SharedConfig.useMediaStream ? "Use call stream in voice chats" : "Use media stream in voice chats" }; builder.setItems(items, (dialog, which) -> { if (which == 0) { @@ -2677,7 +2691,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. getMessagesStorage().clearSentMedia(); SharedConfig.setNoSoundHintShowed(false); SharedPreferences.Editor editor = MessagesController.getGlobalMainSettings().edit(); - editor.remove("archivehint").remove("proximityhint").remove("archivehint_l").remove("gifhint").remove("soundHint").remove("themehint").remove("filterhint").commit(); + editor.remove("archivehint").remove("proximityhint").remove("archivehint_l").remove("gifhint").remove("reminderhint").remove("soundHint").remove("themehint").remove("filterhint").commit(); SharedConfig.textSelectionHintShows = 0; SharedConfig.lockRecordAudioVideoHint = 0; SharedConfig.stickersReorderingHintUsed = false; @@ -2877,6 +2891,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. avatarContainer = new FrameLayout(context); avatarContainer2 = new FrameLayout(context); + AndroidUtilities.updateViewVisibilityAnimated(avatarContainer2, true, 1f, false); frameLayout.addView(avatarContainer2, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); avatarContainer.setPivotX(0); avatarContainer.setPivotY(0); @@ -3030,15 +3045,14 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. updateProfileData(); writeButton = new RLottieImageView(context); - Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_profile_actionBackground), Theme.getColor(Theme.key_profile_actionPressedBackground)); - if (Build.VERSION.SDK_INT < 21) { - Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow_profile).mutate(); - shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY)); - CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0); - combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56)); - drawable = combinedDrawable; - } - writeButton.setBackgroundDrawable(drawable); + + Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow_profile).mutate(); + shadowDrawable.setColorFilter(new PorterDuffColorFilter(Color.BLACK, PorterDuff.Mode.MULTIPLY)); + CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, + Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_profile_actionBackground), Theme.getColor(Theme.key_profile_actionPressedBackground)), + 0, 0); + combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56)); + writeButton.setBackgroundDrawable(combinedDrawable); if (user_id != 0) { if (imageUpdater != null) { cameraDrawable = new RLottieDrawable(R.raw.camera_outline, "" + R.raw.camera_outline, AndroidUtilities.dp(56), AndroidUtilities.dp(56), false, null); @@ -3056,20 +3070,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. } writeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_profile_actionIcon), PorterDuff.Mode.MULTIPLY)); writeButton.setScaleType(ImageView.ScaleType.CENTER); - if (Build.VERSION.SDK_INT >= 21) { - StateListAnimator animator = new StateListAnimator(); - animator.addState(new int[]{android.R.attr.state_pressed}, ObjectAnimator.ofFloat(writeButton, View.TRANSLATION_Z, AndroidUtilities.dp(2), AndroidUtilities.dp(4)).setDuration(200)); - animator.addState(new int[]{}, ObjectAnimator.ofFloat(writeButton, View.TRANSLATION_Z, AndroidUtilities.dp(4), AndroidUtilities.dp(2)).setDuration(200)); - writeButton.setStateListAnimator(animator); - writeButton.setOutlineProvider(new ViewOutlineProvider() { - @SuppressLint("NewApi") - @Override - public void getOutline(View view, Outline outline) { - outline.setOval(0, 0, AndroidUtilities.dp(56), AndroidUtilities.dp(56)); - } - }); - } - frameLayout.addView(writeButton, LayoutHelper.createFrame(Build.VERSION.SDK_INT >= 21 ? 56 : 60, Build.VERSION.SDK_INT >= 21 ? 56 : 60, Gravity.RIGHT | Gravity.TOP, 0, 0, 16, 0)); + + frameLayout.addView(writeButton, LayoutHelper.createFrame(60, 60, Gravity.RIGHT | Gravity.TOP, 0, 0, 16, 0)); writeButton.setOnClickListener(v -> { if (writeButton.getTag() != null) { return; @@ -3079,8 +3081,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. needLayout(false); if (scrollTo != -1) { - //layoutManager.scrollToPositionWithOffset(scrollTo, scrollToPosition); - if (writeButtonTag != null) { writeButton.setTag(0); writeButton.setScaleX(0.2f); @@ -3214,6 +3214,82 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. updateSelectedMediaTabText(); + + ViewGroup decorView; + if (Build.VERSION.SDK_INT >= 21) { + decorView = (ViewGroup) getParentActivity().getWindow().getDecorView(); + } else { + decorView = frameLayout; + } + pinchToZoomHelper = new PinchToZoomHelper(decorView) { + + Paint statusBarPaint; + @Override + protected void invalidateViews() { + super.invalidateViews(); + fragmentView.invalidate(); + for (int i = 0; i < avatarsViewPager.getChildCount(); i++) { + avatarsViewPager.getChildAt(i).invalidate(); + } + if (writeButton != null) { + writeButton.invalidate(); + } + } + + @Override + protected void drawOverlays(Canvas canvas, float alpha, float parentOffsetX, float parentOffsetY, float clipTop, float clipBottom) { + if (alpha > 0) { + AndroidUtilities.rectTmp.set(0, 0, avatarsViewPager.getMeasuredWidth(), avatarsViewPager.getMeasuredHeight() + AndroidUtilities.dp(30)); + canvas.saveLayerAlpha(AndroidUtilities.rectTmp, (int) (255 * alpha), Canvas.ALL_SAVE_FLAG); + + avatarContainer2.draw(canvas); + + if (actionBar.getOccupyStatusBar()) { + if (statusBarPaint == null) { + statusBarPaint = new Paint(); + statusBarPaint.setColor(ColorUtils.setAlphaComponent(Color.BLACK, (int) (255 * 0.2f))); + } + canvas.drawRect(actionBar.getX(), actionBar.getY(), actionBar.getX() + actionBar.getMeasuredWidth(), actionBar.getY() + AndroidUtilities.statusBarHeight, statusBarPaint); + } + canvas.save(); + canvas.translate(actionBar.getX(), actionBar.getY()); + actionBar.draw(canvas); + canvas.restore(); + + if (writeButton != null && writeButton.getVisibility() == View.VISIBLE && writeButton.getAlpha() > 0) { + canvas.save(); + float s = 0.5f + 0.5f * alpha; + canvas.scale(s, s, writeButton.getX() + writeButton.getMeasuredWidth() / 2f, writeButton.getY() + writeButton.getMeasuredHeight() / 2f); + canvas.translate(writeButton.getX(), writeButton.getY()); + writeButton.draw(canvas); + canvas.restore(); + } + canvas.restore(); + } + } + + @Override + protected boolean zoomEnabled(View child, ImageReceiver receiver) { + if (!super.zoomEnabled(child, receiver)) { + return false; + } + return listView.getScrollState() != RecyclerView.SCROLL_STATE_DRAGGING; + } + }; + pinchToZoomHelper.setCallback(new PinchToZoomHelper.Callback() { + @Override + public void onZoomStarted(MessageObject messageObject) { + listView.cancelClickRunnables(true); + if (sharedMediaLayout != null && sharedMediaLayout.getCurrentListView() != null) { + sharedMediaLayout.getCurrentListView().cancelClickRunnables(true); + } + Bitmap bitmap = pinchToZoomHelper.getPhotoImage() == null ? null : pinchToZoomHelper.getPhotoImage().getBitmap(); + if (bitmap != null) { + topView.setBackgroundColor(ColorUtils.blendARGB(AndroidUtilities.calcBitmapColor(bitmap), Theme.getColor(Theme.key_windowBackgroundWhite), 0.1f)); + } + } + }); + avatarsViewPager.setPinchToZoomHelper(pinchToZoomHelper); return fragmentView; } @@ -3304,7 +3380,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. args.putInt("nearby_distance", distance); } ChatActivity chatActivity = new ChatActivity(args); - chatActivity.setPreloadedSticker(getMessagesController().getPreloadedSticker(), false); + chatActivity.setPreloadedSticker(getMediaDataController().getGreetingsSticker(), false); presentFragment(chatActivity, true); if (AndroidUtilities.isTablet()) { finishFragment(); @@ -3558,9 +3634,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. if (i == 0) { try { android.content.ClipboardManager clipboard = (android.content.ClipboardManager) ApplicationLoader.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE); - android.content.ClipData clip = android.content.ClipData.newPlainText("label", "@" + username); + android.content.ClipData clip = android.content.ClipData.newPlainText("label", "https://" + MessagesController.getInstance(UserConfig.selectedAccount).linkPrefix + "/" + username); clipboard.setPrimaryClip(clip); - BulletinFactory.of(this).createCopyBulletin(LocaleController.getString("UsernameCopied", R.string.UsernameCopied)).show(); + BulletinFactory.of(this).createCopyBulletin(LocaleController.getString("LinkCopied", R.string.LinkCopied)).show(); } catch (Exception e) { FileLog.e(e); } @@ -4085,6 +4161,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. isPulledDown = true; overlaysView.setOverlaysVisible(true, durationFactor); avatarsViewPagerIndicatorView.refreshVisibility(durationFactor); + avatarsViewPager.setCreateThumbFromParent(true); + avatarsViewPager.getAdapter().notifyDataSetChanged(); expandAnimator.cancel(); float value = AndroidUtilities.lerp(expandAnimatorValues, currentExpanAnimatorFracture); expandAnimatorValues[0] = value; @@ -5487,8 +5565,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. } avatarDrawable.setInfo(user); - final ImageLocation imageLocation = ImageLocation.getForUser(user, true); - final ImageLocation thumbLocation = ImageLocation.getForUser(user, false); + final ImageLocation imageLocation = ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_BIG); + final ImageLocation thumbLocation = ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL); final ImageLocation videoLocation = avatarsViewPager.getCurrentVideoLocation(thumbLocation, imageLocation); avatarsViewPager.initIfEmpty(imageLocation, thumbLocation); String filter; @@ -5694,8 +5772,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. photoBig = chat.photo.photo_big; } avatarDrawable.setInfo(chat); - final ImageLocation imageLocation = ImageLocation.getForChat(chat, true); - final ImageLocation thumbLocation = ImageLocation.getForChat(chat, false); + final ImageLocation imageLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_BIG); + final ImageLocation thumbLocation = ImageLocation.getForUserOrChat(chat, ImageLocation.TYPE_SMALL); final ImageLocation videoLocation = avatarsViewPager.getCurrentVideoLocation(thumbLocation, imageLocation); boolean initied = avatarsViewPager.initIfEmpty(imageLocation, thumbLocation); if ((imageLocation == null || initied) && isPulledDown) { @@ -6166,6 +6244,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. return; } avatarProgressView.setProgress(progress); + avatarsViewPager.setUploadProgress(uploadingImageLocation, progress); } @Override @@ -6192,6 +6271,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. req.flags |= 4; } getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> { + avatarsViewPager.removeUploadingImage(uploadingImageLocation); if (error == null) { TLRPC.User user = getMessagesController().getUser(getUserConfig().getClientUserId()); if (user == null) { @@ -6223,7 +6303,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. src.renameTo(destFile); String oldKey = avatar.volume_id + "_" + avatar.local_id + "@50_50"; String newKey = small.location.volume_id + "_" + small.location.local_id + "@50_50"; - ImageLoader.getInstance().replaceImageInCache(oldKey, newKey, ImageLocation.getForUser(user, false), false); + ImageLoader.getInstance().replaceImageInCache(oldKey, newKey, ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), false); } if (big != null && avatarBig != null) { File destFile = FileLoader.getPathToAttach(big, true); @@ -6245,6 +6325,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. allowPullingDown = !AndroidUtilities.isTablet() && !isInLandscapeMode && avatarImage.getImageReceiver().hasNotThumb(); avatar = null; avatarBig = null; + avatarsViewPager.setCreateThumbFromParent(false); updateProfileData(); showAvatarProgress(false, true); getNotificationCenter().postNotificationName(NotificationCenter.updateInterfaces, MessagesController.UPDATE_MASK_ALL); @@ -6252,7 +6333,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. getUserConfig().saveConfig(true); })); } else { - allowPullingDown = false; avatar = smallSize.location; avatarBig = bigSize.location; avatarImage.setImage(ImageLocation.getForLocal(avatar), "50_50", avatarDrawable, null); @@ -6263,11 +6343,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. } needLayout(true); } + avatarsViewPager.addUploadingImage(uploadingImageLocation = ImageLocation.getForLocal(avatarBig), ImageLocation.getForLocal(avatar)); showAvatarProgress(true, false); - final View view = layoutManager.findViewByPosition(0); - if (view != null && isPulledDown) { - listView.smoothScrollBy(0, view.getTop() - AndroidUtilities.dp(88), CubicBezierInterpolator.EASE_OUT_QUINT); - } } actionBar.createMenu().requestLayout(); }); @@ -6582,7 +6659,11 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. break; case 0: case 9: - abi = "universal " + Build.CPU_ABI + " " + Build.CPU_ABI2; + if (AndroidUtilities.isStandaloneApp()) { + abi = "direct " + Build.CPU_ABI + " " + Build.CPU_ABI2; + } else { + abi = "universal " + Build.CPU_ABI + " " + Build.CPU_ABI2; + } break; } cell.setText(LocaleController.formatString("TelegramVersion", R.string.TelegramVersion, String.format(Locale.US, "v%s (%d) %s", pInfo.versionName, code, abi))); @@ -7586,6 +7667,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. final Object onlineTextViewTag = onlineTextView[1].getTag(); if (onlineTextViewTag instanceof String) { onlineTextView[1].setTextColor(Theme.getColor((String) onlineTextViewTag)); + } else { + onlineTextView[1].setTextColor(Theme.getColor(Theme.key_avatar_subtitleInProfileBlue)); } } if (lockIconDrawable != null) { @@ -7594,7 +7677,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. if (scamDrawable != null) { scamDrawable.setColor(Theme.getColor(Theme.key_avatar_subtitleInProfileBlue)); } - nameTextView[1].setBackgroundColor(Theme.getColor(Theme.key_avatar_backgroundActionBarBlue)); nameTextView[1].setTextColor(Theme.getColor(Theme.key_profile_title)); actionBar.setItemsColor(Theme.getColor(Theme.key_actionBarDefaultIcon), false); actionBar.setItemsBackgroundColor(Theme.getColor(Theme.key_avatar_actionBarSelectorBlue), false); @@ -7766,6 +7848,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. } } + public void scrollToSharedMedia() { + layoutManager.scrollToPositionWithOffset(sharedMediaRow, -listView.getPaddingTop()); + } + private class DiffCallback extends DiffUtil.Callback { int oldRowCount; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/VoIPFragment.java b/TMessagesProj/src/main/java/org/telegram/ui/VoIPFragment.java index 5a876ec85..843db0086 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/VoIPFragment.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/VoIPFragment.java @@ -427,11 +427,9 @@ public class VoIPFragment implements VoIPBaseService.StateListener, Notification initRenderers(); VoIPService.getSharedInstance().registerStateListener(this); } - } - if (id == NotificationCenter.emojiDidLoad) { - checkEmojiLoaded(true); - } - if (id == NotificationCenter.closeInCallActivity) { + } else if (id == NotificationCenter.emojiDidLoad) { + updateKeyView(true); + } else if (id == NotificationCenter.closeInCallActivity) { windowView.finish(); } } @@ -574,7 +572,7 @@ public class VoIPFragment implements VoIPBaseService.StateListener, Notification } }); - callingUserPhotoView.setImage(ImageLocation.getForUser(callingUser, true), null, gradientDrawable, callingUser); + callingUserPhotoView.setImage(ImageLocation.getForUserOrChat(callingUser, ImageLocation.TYPE_BIG), null, gradientDrawable, callingUser); currentUserCameraFloatingLayout = new VoIPFloatingLayout(context); currentUserCameraFloatingLayout.setRelativePosition(1f, 1f); @@ -696,7 +694,7 @@ public class VoIPFragment implements VoIPBaseService.StateListener, Notification statusLayout.setFocusableInTouchMode(true); callingUserPhotoViewMini = new BackupImageView(context); - callingUserPhotoViewMini.setImage(ImageLocation.getForUser(callingUser, false), null, Theme.createCircleDrawable(AndroidUtilities.dp(135), 0xFF000000), callingUser); + callingUserPhotoViewMini.setImage(ImageLocation.getForUserOrChat(callingUser, ImageLocation.TYPE_SMALL), null, Theme.createCircleDrawable(AndroidUtilities.dp(135), 0xFF000000), callingUser); callingUserPhotoViewMini.setRoundRadius(AndroidUtilities.dp(135) / 2); callingUserPhotoViewMini.setVisibility(View.GONE); @@ -1670,20 +1668,23 @@ public class VoIPFragment implements VoIPBaseService.StateListener, Notification } private void updateKeyView(boolean animated) { - TLRPC.EncryptedChat encryptedChat = new TLRPC.TL_encryptedChat(); VoIPService service = VoIPService.getSharedInstance(); if (service == null) { return; } + byte[] auth_key = null; try { ByteArrayOutputStream buf = new ByteArrayOutputStream(); buf.write(service.getEncryptionKey()); buf.write(service.getGA()); - encryptedChat.auth_key = buf.toByteArray(); + auth_key = buf.toByteArray(); } catch (Exception checkedExceptionsAreBad) { FileLog.e(checkedExceptionsAreBad); } - byte[] sha256 = Utilities.computeSHA256(encryptedChat.auth_key, 0, encryptedChat.auth_key.length); + if (auth_key == null) { + return; + } + byte[] sha256 = Utilities.computeSHA256(auth_key, 0, auth_key.length); String[] emoji = EncryptionKeyEmojifier.emojifyForCall(sha256); for (int i = 0; i < 4; i++) { Emoji.EmojiDrawable drawable = Emoji.getEmojiDrawable(emoji[i]); @@ -1701,6 +1702,7 @@ public class VoIPFragment implements VoIPBaseService.StateListener, Notification private void checkEmojiLoaded(boolean animated) { int count = 0; + for (int i = 0; i < 4; i++) { if (emojiDrawables[i] != null && emojiDrawables[i].isLoaded()) { count++; diff --git a/TMessagesProj/src/main/res/drawable-hdpi/bot_card.png b/TMessagesProj/src/main/res/drawable-hdpi/bot_card.png new file mode 100644 index 0000000000000000000000000000000000000000..ebe0630d57b677b3433c1599e838fdc3e0cdac10 GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|#^NA%Cx&(BWL^R}E~ycoX}-P; zT0k}j17mw80}DtA5K93u0|WB{Mh0de%?J`(zyy~STEL88gA~qMxhWJ#`FXlHhFAzD zCrIpj@c;k+c@BRhI!>}G?48%+@W{|$Mv4Z{Ds_eCf590i6t4Q2t~U%k-MpAhkk2zf s!d7uj&w?(XRxzya}?w)78&qol`;+0EDAAwEzGB literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-hdpi/msg_addbio.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_addbio.png new file mode 100644 index 0000000000000000000000000000000000000000..67ab5fba86c570d8f61a7f7a6f562c374b9379b1 GIT binary patch literal 1050 zcmV+#1m*jQP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91B%lKT1ONa40RR91Bme*a04fgS`~Uz0gh@m}R9Fekm`_L)Q5?s2wG=H1 zG7&2(@KSn^f-ZHaESz=;FZ+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nH1+Rf`FSxh`>OM&1c;fq}c-=;Yh>U0keDET@qd(s`P#S9< zt@LJ!>#tsQSjgkxt*P6@H4 zCRW67ww7n)N8nC^?@lAHuYRq;TXPz@l|lg%JC5`jA9TaPn{yg-bA`eC1{EJDk8G!J zI=SH{nD~=S$MI&4P%(h!3HTvjLCa0S-vlz{oyZUvSk{cQh0J727vx&7g!pAkV>gr@ z_p-m>P10+>Q6A-!S^ka{WG}x1-ZjT5C#>buZ2)cAMwlXHxjY9>WBJodf^7rYUX!5W zqWPUD@dIf0oOau^wnBD2$W!@}6PveKA>Q)EMz(@TtTo z1tBPXb=ZOqemvuIbrY&K%?6}+(HhvbkK zf!Qvdwhw5F#btY=6frtSShq^L;dBT$dq(Fh4*7~>ruac;u4JtskIv5^+dYcvf}#IV zw3nOJk?|Cy$HF=||DV!+Wfax}L;178&s*E4sMi0Esob)<3Mue>|FEhn@GR#41A@s; U#m^^Gs{jB107*qoM6N<$f}#eM1^@s6 literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-mdpi/msg_report_abuse.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_report_abuse.png similarity index 100% rename from TMessagesProj/src/main/res/mipmap-mdpi/msg_report_abuse.png rename to TMessagesProj/src/main/res/drawable-hdpi/msg_report_abuse.png diff --git a/TMessagesProj/src/main/res/mipmap-mdpi/msg_report_fake.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_report_fake.png similarity index 100% rename from TMessagesProj/src/main/res/mipmap-mdpi/msg_report_fake.png rename to TMessagesProj/src/main/res/drawable-hdpi/msg_report_fake.png diff --git a/TMessagesProj/src/main/res/mipmap-mdpi/msg_report_other.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_report_other.png similarity index 100% rename from TMessagesProj/src/main/res/mipmap-mdpi/msg_report_other.png rename to TMessagesProj/src/main/res/drawable-hdpi/msg_report_other.png diff --git a/TMessagesProj/src/main/res/mipmap-mdpi/msg_report_spam.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_report_spam.png similarity index 100% rename from TMessagesProj/src/main/res/mipmap-mdpi/msg_report_spam.png rename to TMessagesProj/src/main/res/drawable-hdpi/msg_report_spam.png diff --git a/TMessagesProj/src/main/res/mipmap-mdpi/msg_report_violence.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_report_violence.png similarity index 100% rename from TMessagesProj/src/main/res/mipmap-mdpi/msg_report_violence.png rename to TMessagesProj/src/main/res/drawable-hdpi/msg_report_violence.png diff --git a/TMessagesProj/src/main/res/mipmap-mdpi/msg_report_xxx.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_report_xxx.png similarity index 100% rename from TMessagesProj/src/main/res/mipmap-mdpi/msg_report_xxx.png rename to TMessagesProj/src/main/res/drawable-hdpi/msg_report_xxx.png diff --git a/TMessagesProj/src/main/res/drawable-hdpi/msg_timeredit.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_timeredit.png new file mode 100644 index 0000000000000000000000000000000000000000..a0bbaad250d9046a79089a936eccfb564587b8a0 GIT binary patch literal 1086 zcmV-E1i|}>P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91B%lKT1ONa40RR91Bme*a04fgS`~Uz0s7XXYR9Fe^mPu@lQ545Lijc-o zikc#^5gH2wX@Ybih(t^YB4T01jG!_jcIoop{<15O=!kw(sZ@9BEQB)n4s~!l zkw`qncfQfkDu}W-EFOf(9o`j1yM>Apn*!QA&T0vc57o%KPV!(_4o9E?zQg8FBC#Uq z3xl8nR>L_^p0ytgwn6?|1(6EQgxzopTEI6I>>p|>Y8|~A+yQQ5$C>NC3mby75M@m) zes%&2!d1c%^2fm)r_OoC;VVV3#)yC7ufP^q3SU8{b=kh~w(${i`@v-uF}5j~fuIDY zL0>Ckdm+6q6(2JlHg7Bxq=%gLD$rOB=#EQ4l~ za6kdZ-Qc}hJCYTffmxSJ`mv}vx>B$Y%VDeOY6qU5&D_S)Vm<@StW_IbA5Y)rDfM2F zbkQWvp}E*6?j!ZFj{5SLL+78~Jv;|p<3Mx@t8{AZ!H+NaiG zX3v}}WPT#uaI(P}SJ2-xMpcQ|w<>r#aHGPyfJ{Yu=ZM<5KrJ0_t!*#33>jN(7XCEkdusC5 zrbZ>`C@iao!oQ1%yTS#qrl#6`rO2HRA5AfxhbHFz4}1Yhy20<7B69lqCi%L!IeMKE zb|k1|%Oc%$NbB7>k44ofy`glX(f`xTHpSruq6Z zXaU(A42G$TlC0TWzSWdSpS4N|DZ_xKM31CxNKi(^Ox z=i6!aI?RDG$D=2SDZ1#0DXI$2HksJ5WaSJMwv7f?R8-g&&peVPG~3mOhexQT^GJds z+p;JhC-F|kkIU`s_h#RH`tI)hxUJ6hC%3=9TfP7N``UL)%fCA<%nB)AaHvdS_SwG0 z3%d?5EfM#uSr~G2VS@)(uh{%8!l|uH5A-J#>|GqFA7C0csrHH6hc}F-Z>~jWDLh=^ z{M&(dSK}{!g@+j~?G9h99a(urLUnE&y2BYz+chU3!t|wy`$xZ`C!SIcg(A*=rt&8| zTMj?8zV(Q?gJYIs`U~lwoz*_Fu9pK`?j6dsXAzTIdHEeTSF*O%CXJ{!7kF83**GRn zIPVy+JE@d;I*-}TCMCnZd23g(*qE(mzG?SO=Z5Pg#;j|Ty|3&G_#P4|Jwsy`Z-w}p zQ+thOgd94d;^`gsuHm@d3iD@d%i51@ZxA=1KKb*dDat+DtfkY+IoCaZlfbjSQf%7s z_kve%OK$mS@>cZJ0`;|1|8dN6Uls9W^Tt(PC(bjP$>I^TWP6|i9%1@Adw_#UGDSOSE1N?r5e?nP)e+>nt5l>e?mvv4FO#rqV B3xfav literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-hdpi/payment_address.png b/TMessagesProj/src/main/res/drawable-hdpi/payment_address.png new file mode 100644 index 0000000000000000000000000000000000000000..7341068be35e770a0580f1ffef3135029382775b GIT binary patch literal 930 zcmV;T16}-yP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031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ment_card.png new file mode 100644 index 0000000000000000000000000000000000000000..7572ef30b2002d63b11cf74aadcf3067cd81a277 GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbB7>k44ofy`glX(f`xTHpSruq6Z zXaU(A42G$TlC0TWzSWdSpS4N|DZ_xKM`nXadcV@L$& z+i*v|CIbPH$J~2n7JNA;{-f>BvDNPte(=^bmG`sc*DR;+t#HK`E<2>#uV{T`# zX(nSv1OJ3W>olSmpD3yS-RYI)0CQfsUp3Y_~mGw;Oz z18V=?NnP6AqyPC;TddjFjn=JSwuzTUS-5y<2hQQhS-DU=WDmQsGW(5pG0TFc-@Q92 z(z&X$B!?^06^U3Q`fC^Go{LM(fTm9LmzUMuWWL~#zqR@a)vh|9WaFaT+`oq|Z#=Iu z>x5xW)k*$oJnUKRZCnpHS%Q@MGS~R_J&kp&C({=w|dS>y10?^ad K&t;ucLK6V>4x;7& literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-hdpi/payment_delivery.png b/TMessagesProj/src/main/res/drawable-hdpi/payment_delivery.png new file mode 100644 index 0000000000000000000000000000000000000000..2f5fc2389396d43689b4b46f95f88f1a62430efd GIT binary patch literal 842 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbB7>k44ofy`glX(f`xTHpSruq6Z zXaU(A42G$TlC0TWzSWdSpS4N|DZ_xKM31Jf2y7srqY z&bQOgdxr#y98Z@y?W85~qP<0N>jaHMVhgu&+;;IUf3(c3aa)o2+Zc|2+>wgAasnMW z|8+;?-Ddh}&v!x=41+XKM<bZqE`RxSlG?B_Iu7~kf+!I$sIbUM<8W-uyE1$WFjW>10&#>862k!HkhQ4hpnLca9 z?ghTA<$2#-MYFaWG3PPw)|mZxmuqrw(8@I4m*-=G^v~}x>&(78p;q{uhx5t*QZqzp6;5M-hU^y|6yH&*atZu=J|IOKMLeDac8{Y2s91jd|I0BY^!I= z^}Lg%(J_y0enakYW+ukY{8=&EJOw{??Tt&?;mumJ@@C8l?qe$MC5?M--Zkb-`YB~7 z&miAy9ssHeUNmpr`vd>?GuJaN`enZL$33y{ Ppmgl%>gTe~DWM4f`kGul literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-hdpi/payment_email.png b/TMessagesProj/src/main/res/drawable-hdpi/payment_email.png new file mode 100644 index 0000000000000000000000000000000000000000..a5062eeea4e0e16464280f368166a31ce872e784 GIT binary patch literal 1116 zcmV-i1f%Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91B%lKT1ONa40RR91Bme*a04fgS`~Uz0#z{m$R9Fe^mtAO%VHn5vj%Mrt z!?Nu_lzfC7EJ<;IMC4tv`K9~n{9so zclY(UpO5!_pRpa#{`KE=-`DlO@B7;Q++S}|(K!CG8OV$@-=U$Q656bU>)={g38y&r zVV}UKuobptGMORl=z~N`;Q{y_rbP$BBXCmMj8e@I9oEv}X;>BM_ycv#$TRp8mcwO^ z6R?Ko6zZ6*Tjuy9OClNA2z`8}athAN)hV$`co23$!ytu*Tx|;aX{=-}TW`*`U^NS= zfVK>tfCJFbn5uD9MC)VL1NJN26V;@x({?NDgNC}aZL>OB)k00Npk!8zsDlJCeXN1s zq3{hZO_0T12(_EuLc{L3YS@EdI@}B!U_IOcbAD1{yP)9_g~FQ(k+!y>B`Fz#GoaR! z{l})4mG2BJ&C&L%L=M}MG=UFM3AA%YyJ>n5bOn5i;VW1OcM()1wAT*QClek->1%eWFeiVB6ppINMR>c4&A)VPZl*7fgViAB_iff=4~!+#uiz#Ljwgolmhf zARlbyGHveXsthQf6}R_s?O z>!K8N9YnDThb`3Re3zz+HMsI@nx%eIDo8!l#3F+1rbT>t@$aCahjKe}-v(Rg6 zMf(b~%^{mBp?+WF%0Ci(`CR@dot7Z%alTo8ESiwsGeXkg)-@c;{;l!Kxr)BVPtNoM zt`N#0R6(GJm9S*kg#O;7_RVG$%cuk-$PC-Q|6VeXlGonIbxQMnxW7SLsKa+ zKL7mC){Z5GuNWSOKJNL05zqnL=>+%vSg4F(trN-Y4+W{4} z>et8%cn7_0X{y;ztwp^7&V!%eJv2#Y9iap;kS^IlDD=Y6Nt@7Q>|G?GN4i08oSkDo zYJm|*qR}#P_6pYSy8^ApC`|k1|%Oc%$NbB7>k44ofy`glX(f`xTHpSruq6Z zXaU(A42G$TlC0TWzSWdSpS4N|DZ_xKM315>7_i(^Ox z=iBM$y+s2h+GLM9Y}h1lk>gPB>}^@n%{h~$r|Wee=)EAnKzsW-mWg3&d9(^HE}Oes zyNP>qhGJ9P%DIlJ5h`9YAAdG`ejss|aq+WzJ1-^KRXm$x`MJ*iPujV_=qN93>wq$a zR}KyKa|*a(8|a8dh6HDlYvXZhK}eTl-t`;QZMvRlfgA z)Z`@2F1ncgqTfFM$Gio%d^dIZ8qE~q)!j&<&VYigGdDZXluRklmnGiBNO*OHFA9n?4Y zJU`>H)?v-+8R7}K+or9XU~1%ZL#M|oeaqIZvqRo6*s$D|T=p>fg@#IHkbsa+qu&Fa zV8gwhglFeEsNy{zlo6oITvQk#*fH0Fz(_d8?qxFZ< zPZ-TTxBX$4@|~o*`FXXa*ZwRMS$yt>{U*N|=MRM1zxQahYjC{5ke%)GhW~{)Uwhex z^`1w0epOxzdw8Gibi&)h+|)x_agVP}E>v@zmOazrdgA>fwbQTvTv>Rfp6{Lc1Z}?< zpEZ@j;m+lMcD|c@Z|SyeYfiEMP@W}Lbhl*D4ViO6MUKGGo|~cZ=GC#ymYbR{pHr+@ pX&61%-|>v)#Ph2|{vVgMVE^NHCi(38Dbk?C=jrO_vd$@?2>?vHMa2LB literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-hdpi/payment_phone.png b/TMessagesProj/src/main/res/drawable-hdpi/payment_phone.png new file mode 100644 index 0000000000000000000000000000000000000000..5ba9c8f28e128e40b9a40fe9b853bccc43afd478 GIT binary patch literal 778 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|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ks*u$It$fn?0 ze@NJ()%6Gdu0OzfEHC0^*}UTl PpcLlm>gTe~DWM4f%Re?g literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-mdpi/bot_card.png b/TMessagesProj/src/main/res/drawable-mdpi/bot_card.png new file mode 100644 index 0000000000000000000000000000000000000000..471992ec8993997c777c52c4ac88d208fcceeb56 GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}E~ycoX}-P; zT0k}j17mw80}DtA5K93u0|WB{Mh0de%?J`(zyz1&S-^~7gA@w${E7uqZk{fVAsV8| z2@0Zr{{P?4+fmPGsK^j>`51>v9iwid>ZL{ZT~;l2kUZh}-}B;mm#(A$zslrwhHiniPvne}Y{(7F0h5a)Xv%ec$sia!yOJWhfjJl z{2gqkXFT889c}n5W1{E;pPBcw=Tt?!s@$Oa9iy0R$$!r@Z~ zw=1V#tdcU-l2|;)CHI%Q#b>*epvPy@9U^q2w%odO>+7oGGZwYtORxR-wqnA(gLZq` zpRb8~T9Fm$ajkHfpTj;g3&z+^&e|WR^J-$QTjZ678szhAda^ox#+qsR*3VvWU3_+m zFJ#YLiRqKLx75V`K6x&nG-c(*_s3a2|0$UAStQPxH*GD$x2@YxBx(9C>XZGII`7eb zrpdNF$IT>nGd(t&=C?QKWJAs*>H1&0{Ok^^M?CAjeEWO-Q~eh&JmxS*b^__CNb$3eho0E-Bev{@rIdryh^_*)b=XTp4JR3T(+xlsb%9dzt zdnHe=Q~e)*-kOH#0r9iB-)hyxRu@MkzP`O}u8Vx5;Ry$An?s^+ z4oypqoW5m0w^&|_YXyV(yccs0>(*F!ZhbwWH-@oTU8eaF&ojlhu?>aBK8MUS<|Uqb z&G{zz)Ir-lj&f2=z4KJ&CGKE2+T?DuyF)jiMO?!4>IcDpA~FZ8d)RjgUUM)M&iJ8t zau3g)gQg~uWkPosys~b4Ai3bH6X&OSTQ0iJW<5G7K0@>P+dAhDJQtSBo^MmnEx9Nh z(9#rdp%`g2X&>V**4l);|GV==`<2u+{oMag(Yq16D5_w=o2*&->zP-)xacnvv_M$4 zN~v;!qRsCOJc$q2T~?dS<-%**;dI^gNkF6Yg>Sc&&vTjYdi`Qw*U`%D>$fa7Sm45& zbRqJw$J*arW-rS>%v=4>cdq9`-p|4kY70&@%ZHue2;_?ro6mPECUw#JX0e(JPn`d} z4xO0R`(X7U%>}2|F?`+mW{%R=-RnXf4)VSFeo%Az53NZ{0(|Xe{{MWjygaD;oAB(( VoU!U+fuBK<>gnp|vd$@?2>>YD^~wMM literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-mdpi/msg_timeredit.png b/TMessagesProj/src/main/res/drawable-mdpi/msg_timeredit.png new file mode 100644 index 0000000000000000000000000000000000000000..fe98501226f829efdfc14b06ff33000dd3df4d02 GIT binary patch literal 726 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uv49!D1}S`GTDq2jfyu$s#WBQ# z_v%!Cj}S+hw2`# zJl~xAL+yUKzs?;8h0YwbKL7dBmZ#FfTMn?@n6}KA=Xlv1#z5gOhgsGf%--H{gKkj9tvl{lk(JLZVDyFIH zY|FiM&snQXJt9!RdR{KqzkAB74&FER+_OL_dVbdvjTdZ@;VPM|C)(XB`SzdldbwAY zRrac(wcHPu#~=9BlswfNp6Q)%dn@wyp2Df8TOV7_e^RV$F`ql{@r;A(S~GvSJ8ZXP zZ9iNQ=dHvj`GbwO@}!dNmR(EMJCrT%FtPX_8#(uX>$j3XLr;@k`ue_SPx$>(=>MVi z;`NHFJPuDHgf35uXoZOno^uK>T&`>S(7ihU`rAqD+ge4k@~t0e z>NNbj_^&DMne>ZBsol$R<}=>qj`}vETJC}UoDA>e!v|QVfYOwwtDnm{r-UW|dL$>F literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-mdpi/msg_voiceshare.png b/TMessagesProj/src/main/res/drawable-mdpi/msg_voiceshare.png new file mode 100644 index 0000000000000000000000000000000000000000..610261900216f118d4213635e350d747c3ac62fc GIT binary patch literal 479 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uv49!D1}S`GTDlgf%+u4wF~o!S z?G!`r!wCXy!V@38h}+=IZq8n)ReEJ_^MjBAUDouwOLlZWc=SMpqvNXl4yRpqMf_n*WOm{e7-hWRJvo)3(mL&o49KEAC^yeaX9Uz zTE{WAq)!~uOJ|*t>^N!rW9f_zftmv~cSOt_GTHSK7!-B7UdO1dxZ*f(+I`n9x4%Y{ zIoWrANaje8hY@5!HaVMme7nOnb73anEdHgZ;e%a!cYycYB*Xo2At zzb7kL&%Dd}_{4O1p+~a6`Tx(7*A;yf8U(C1uv#s8b{i!E-g=9qslGqLfj(Q9>CI#DCzi0MJ;3g*B-%@!Y{_X|I9WJw9RC@K|lN_M(E zn)mVV@q5SZs=ryPwN0(rd_C^<|LbPwQj2!h_tn^bUVU{{3G)Tc&>c;WYwXtl`F`+0 z*^QRy56-4vZ*BJT_{%2YZkXrHKIZ`6oW@1$X$$1FHk{agGj*-LgdLOq2bR+po>+$( z+h#72{b+j7_K?|*=5z_Jt~rZL+_e2?U*=lgam{g~RM?fUrM)s0*}LOdAF|GIKA8P< z1#h>*-UJ)*I{l6ASD3qs79DJh(tK4@JB8`*rkAhTIu7rz*mYiXdA#?d;*&Rb?$nL$ zpDTFvFLPASue-bEe7$gzf6kp{*OJp+zNXzaeLXRfeebSq+#8Z!MW>aDzustk=U(}_ z{~zU?>K|^`m~c`#f5B88#ZBVHS~orKKb*1($c`l#Nycr-#0XhS2Sxz2&wQUUY>c~BP=yvIsK56)TK=q zX8La6p0Vq*!?A3S)5?dpKTlk_@qp8;jzfnIxt;WysIxI}o5-Y`zl>gg7#A(m(b1gUc|#-k(5b!? zNo}8!A76JfG`72+{qFU-3d6;bR$pgUpWl1G_}uKz?`jub*#GwubsJhNSB^iIVBN5`?^>9XK^N zom(KhlKZvzi4&R&Z6~aD`{^_P&XF(cSocepZ0f66WL$oK?qc4@-1Uta>-)e zM47%sk)Q)tGU?U}=} zb}r`-J~RGPTOS>N;G)22R4dzS7;mH<-zqjnAOb+$Z? zZ?=nD+w(3wEFM6-hKS?O(jd?VuHYmnDUHx3vIVCg!0PzF( AfB*mh literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-mdpi/payment_email.png b/TMessagesProj/src/main/res/drawable-mdpi/payment_email.png new file mode 100644 index 0000000000000000000000000000000000000000..37ad4f77f1ea0b53162bdae9c310138dc78695a2 GIT binary patch literal 713 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uv49!D1}S`GTDq2jfyvm@#WBQ# z_wJPa{=tDF$8WbCw6HL+RERa5;J~x2d3Nd~DJOQBpW<^AeDsdEh)-Upljn1H&H^W% z84R49yqvNsie-!&13qqVinF^P{_gb4*TxHbyXQQaTz&5Qoa*=0-@}y(SDv-J&dUFg z_00jrnpUne2Q^Acw{Vo4IUN1rn_Rl!v_$cL4L-vB@fAW{!5>6Y>=VWET-hDGn_ty6 z+iG61`wz`+x~`mC zeDYnS?FYe9kyP_qp?Z~oInhh^CVq)~WO~7KSMC>{jcXok-Qaqq@HRKA%p=ze)7zVW z+ssnCIA3J%vS}6kr^2{vTw)hZ@)f9WOI;l~|BiHp_{F$|SNBZ&#P?RT)>c)K{~OrPM7 zj$Ij6o>kFoIgB5fFLeImn4iE|v})np2Hgvpw_6HtZ$GL2GXF7SU3~DTcvc=8UZcIb z;`ME}e=@MmW3r7giv90n{WmxF65F-(fW2Mk58BuK{&Bm2-6hjs+qVku zEn3X@k9W)3w&b>-w!c~@D(Bz(Fn8+#@BJInOeU0P{@8Z($Kh(Ws9CISzs0_abIxrx zHk(k%_i5gfOtEO@xzExw4l=6$Y<_)T%YyOoYtz^^)fqfFpZj*4J7{_NNTZCs&u6w0 zh4p@YJ5O ZoN@27n8T*=krAL!_jL7hS?83{1OSc zl&PMaKLc&%C!f3g_H6CtJC)MimS1PSw|qYD^WMvAXSysBTc`ivcb(L>hg^OM+-@ z!QFXRtFQ8zzkamkZ4Pd@6L@}hacXhf>jZz_a~JI*9m2Pkcl8}&TH_!mcY0PEf27ADHjh2d1&M8Y zj?P(rkFk?&b9~^rOConpZ98UX#aUn9^kjEcSp3AyijLGuqn{s7Za072`G_Y@A^lxt x+QUi7D)n{37x?#HU}lZ@W~1MH?a}-_2l!b%>Q8gLz99mN4Nq4;mvv4FO#n%z%Z2~| literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-mdpi/payment_provider.png b/TMessagesProj/src/main/res/drawable-mdpi/payment_provider.png new file mode 100644 index 0000000000000000000000000000000000000000..0e5187d71da0345d707a7efad61a8a5151beba35 GIT binary patch literal 523 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uv49!D1}S`GTDlgftkl!RF~o!S z?UcP<%#I?h)bmpvkB2AhXHsqRfo#SxUs4I%FIcWUmW@GmU&axMum?c{i7-#>P<|EbU zEdHC#_1@fr(|?Fv@P8m#9j8{4ellvV_D{n(TZ4Yt$+YCk_-f4L(O$5TV|vNu$tF?% zT&`Ua*IPc(?`3tpj!E&u35&0*^oBiL%KE+`MRrAcbzY}IRdlxm3-^nyFPuD=%*_6# zbxp41;14biu?u;#-z*Z4%q(ENv&R2r#gzWDwr%FG&fUBfxsF}v|Fifnu75=5G`R;v zoEQDU-MZxS2f=-ZGM|A5|D_GeQo7^XjvEC1ff)68^!1J{+G>*inm sv#z#ze_HVy&XR@vAM{og?>|xTm$%BzIIlrH&jJ(?p00i_>zopr0ND}CdjJ3c literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/bot_card.png b/TMessagesProj/src/main/res/drawable-xhdpi/bot_card.png new file mode 100644 index 0000000000000000000000000000000000000000..844da73b99ec0b729d5e1a312b0080b99f73239d GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uv49!D1}S`GTDlfU<$Ag}hIsHM zCrEsH@c;jRC5Jsy9s3y!w=$g2nJ`nSM}f^?ic^M2P_~0u4WraKUuEunO*%jPl@A|0 zW_0n=hrrG3?i@USLtH+mSYPx#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91FrWhf1ONa40RR91FaQ7m0NXcg3;+NGmPtfGRA>e5ncIs`Q547LH^bx_ zo)}6-C_K!QQgVqR?C-*3pOZ+q>%*ZQut_u1#N_o=G-FO{8vLLT8;TU*D$Ga3vv5cdc0KEi`S zp>Pkq@UCx{xrn^=U8)YpKTxP8_-90jlh=qg(ILZu-q zUpspUH1qM~uhTZHona0YIER8uz{*=H!-ME?)Ox*Y+0YLI?-~yZWSrpc33dT1TBd`H zSvnP`1C|B-P&&`fSrJD|DjxepCRPaaG_i7xN|()iJUL?NN}RC?pwEljCDt+2OX{w1 z*3FgsnokUF8i_d&*c)4K`qGn#(JEkNwc$;zLeL0w6AF!~9gQJ=D}a?vrn^|hQr|YO zjfZZa%#TWZMuH!PNBYR(h^1TbyJ&dyM6C9D(K*c+OI_eK?w|v|Suq|}XLjJ??ZR(H zjLXl1;dW!JZ;Qb_??n0lZ22NT~dKMYeINn)A<(wj;3N?_=gjjB4CBJ^;L5#?I)t zi8`N4rYrGRh#SB$lkE`n`KI3eRc1Vw4UI+$m)#h>4jnx_Ru=ns+L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Ts!AdMZf3e#AYq3Arbrz7```fnhNxo^hQwtKSj3gJ<*X`5}|nX5(5rW%Z_= zCcDxEe+B=*v^@pfLC|J|n+%@{%P1H@V7nr`m>cdr`Sc7S1fBFY^++-qZN4U2(BPxh z_z~-G`^2Hm?MO5l9G!Jc;FW}nwWO4vn?MVjhQMGEo!I5Sq?At#OLtM9D_|gQtDK5> zU|um#p>#L4TqzV$x?78;h|=BMRS`Ue(%xRr6`|!}X&!L6p_D6RJ%wm_=qDX9T>^2B zn6z>G|Bje^Mbr>n^TKYu)AW!I`5uECpc%wH>k$&Sp9?lr|MCRZ zLEUzc??Lx@Z1k;VKa&$B8@$h$z!k~p6lFHh@=t46VI**WHPBjCA9VxguLdMDNQK^k Yzhra_ZTAFRQvd(}07*qoM6N<$g6X*d<^TWy literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/msg_timeredit.png b/TMessagesProj/src/main/res/drawable-xhdpi/msg_timeredit.png new file mode 100644 index 0000000000000000000000000000000000000000..4a6b4ba2f640a9c41dadac51ba33901879ec449b GIT binary patch literal 1437 zcmV;O1!DS%P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91FrWhf1ONa40RR91FaQ7m0NXcg3;+NH2T4RhRA>e5nQf>RMHI(<%2zN8 zHD59-sgN+DHv{R#%q;3dkr7lB7oiVD5*0-S6KBqf6`p-Gfr7-D{i zLWv?R!$K{s%IDmBcN!%;#db>0+$Wgk#KSEfE4=*(n2u$m<)zQ zCxhtpgEI&02dTCb;%yxt1frwB4PYtQ1~e^x1hZqw;ApU8!31y)m!31iC)+7WKx0z5}K!hHBMXA-@$p&a7Y)5U9dlCcY{a4 zqC%fF*G0u^5D?Wn^SX)WrBK!3o z$WP2u1&!$6p0*Z&n!kR&ueMJ7_d8*&USq7!myV-qlL3q-&R@g(UO)Cn=o-l5UBIiZ z?jPq+{8zfZj#b&Y9z<-J6V!q*+}g1L++;+`-QaU;BfNvUU>4mQ8L>h6fs4_GPd7HR zIs@qDqWdf`FYl(*BYg&R=e~{?KSSIYO~PXu1H9Fqze?f-s5jEcb>4MaYis~j zPvA@=<>j}9_OWjMoKE?-8*9HIWe6KKw`&>J< z>hrf(q^be5NqL6iOP!RMska59_CS6ry~ZH!N)k9q^7)H5_bAKPNa9asOMGA5I$HBV z4=~gA4bNEMM%~KXD;wIGZtfkxB4jR zGm-);NN5z#5(n{JS`nff=?^!%Xs2ykAnJ39PF!Xys}iO5A@;Zl=H*+VSo$Xe9c|5) zhq$GFqLy1Er5=Cf-6|C+aiX)>={{IO$y{*s!kg(la#4s|>L*|#IA98tpMt8@t5m1V ziOwu=by=T$^j!@6i~nYbTj@t+5%9LOGN1#UBs(4a;F9WvKdX^6fjSlKaAK-X3vk9SL3PKkEePlAzI=(O*(X0o}abSZb$xD6gN?UoV(jsy*(2L|vFWIoF zxYRy$W`OU!IQ4CybD!N2TL2CNZ`*0yo_e809!Gy-Jk3V%NWY#=HyDJz(CPcWU+!o&w$(&V@AP#>^+-AbJOnla zzgeRhwLf6I2WCYRl@Ji>>x^gKopal#!00000NkvXXu0mjfE=+}x literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/msg_voiceshare.png b/TMessagesProj/src/main/res/drawable-xhdpi/msg_voiceshare.png new file mode 100644 index 0000000000000000000000000000000000000000..f0b6e673a716235fd3237ab2f06553099b5549cc GIT binary patch literal 862 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}E~ycoX}-P; zT0k}j17mw80}DtA5K93u0|WB{Mh0de%?J`(zyy~ySip>6gB0F2&*5QUU^?OH;uw;_ z`gVrDhiIV4G1-#=-bMwm|x^tPX$v$DE0 ztO80Fyf{#Qv9W099o~7(>hbh{LQat6y&WbUgRIHReX4zS=hPgzJBBSqnpC!X0mK=o}9qr z(`@-bdituxW^0;u^*-RKc(d9>tv=|i@^ULn9ncpUkT{a%aZH9X@wC*WW6s_jvgw`@)aAy(?~T)@6i*J=pQ$ z_Roez{UTi10X9Ww+uFBD zG5ce1hJ~PdoX^dDb-z+BD&L#z^Ei4a9zPlaA1gVTTHwpvZ-ZF|*z z#p5m8li-s1S+X4G8$YjFQqSAdes<#g_YVI$Px~wUSfio-Wc4a@`%}D2Iqq|BlMX(* j;f2G+#zoAQ?+@e$tl(Og@Vxg2C~bSX`njxgN@xNA1+Hy& literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/payment_address.png b/TMessagesProj/src/main/res/drawable-xhdpi/payment_address.png new file mode 100644 index 0000000000000000000000000000000000000000..5b98c004875b1eee793947d2e1f64c7b2d4a6b0a GIT binary patch literal 1220 zcmV;#1UvhQP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91FrWhf1ONa40RR91FaQ7m0NXcg3;+NGE=fc|RA>e5n7eBfQ543r8s9|_ z1>cnf3q>mf59d5unLMMe}E{Wm568&A6QrkRz5%wF{O<*z7Rwk(M~a%NYn)1 zg2vys&TLL@?#|rVoz*S&z{frJ+;hI~%;aX~?ld(utZ@gbx&wu(s-5D|(b1`d)`4YU zK?H`Tw-KH*-YFCcKNYMCqv-kcvL2iiI^ZKp+Gt|lJ4Mr=1*>x*YC-w@3&1y6x%&j=g_E6OQqEy_`@ zYvNp5t~QrA0*k?0N4cN*UNAXSM7dFoYOTFtvN)6{Qy#>#fVxEM-yrCQ!`_0X;@QU7)BG3c3}i-`+})7six$VCF{UBf(t zzc4rQh)A43+_BxwMFX~um@yg;NHiX zd0et*Le54d8(Zy33kyNgWr)7wr#^YeIbv#D_eh$uG=Q{X>q@Gbl(fj2&M>jP4m<|$ ziVHkr(poV+(s*rZZ4V~=*G;>C`KDsf_(|@PgvF#aTV}Ov4>qUhr(J+OJ-(k%?GHTh zhl|mqHCtx2Y!5c4=%-!4u&D?=^BglZuA8)GbFG%`!R8eGv2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c!%P literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/payment_name.png b/TMessagesProj/src/main/res/drawable-xhdpi/payment_name.png new file mode 100644 index 0000000000000000000000000000000000000000..5ce8b3a4022ff5da8c298269647af661031a1531 GIT binary patch literal 863 zcmV-l1EBngP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91FrWhf1ONa40RR91FaQ7m0NXcg3;+NE$w@>(RA>e5n7?ZjK@`Vx7KwsC zK`|JDidqO3rn5*RLMjQy&LVJ~BKR+)vlY?_+QfiZp4LKYtAG|3qDhEEK~Yfggox|s znOpfX;j%NkJK0;<2Vdsx-h1Eo<7RhfW@xC9rUOj}nhsRifmV#*Ns^4fyC2xN3A(LT z>j&fD3P}%xJKzQQ16*0>#yl7wxGG5M3RnR?(#2>FMEUoFn?oWu!6pcm4h}ZOsuL2p z2HffLl6!4%5{!UjU7P^t)iVUsC*b6>I>Nc0c>5_sQVCW`Ta& zCm?pGffoLr>wP}HrP&a0FZcygd5+@!P-1&4b?l8dN=wd%h@h981kU^TsSWaa7y91t>=udXkqUZvkH= z;2F_FRQ3B1;;6QH3s@DBb3BZ}4>A7J!m%uRe3gXj{Tj6vQAB+|WW54LDdHPQrCv*k zUJ>8%p}6;a;}jTBMImeP9#nI`HpGOZ3`cN`o7KfxE)OCK2or<7wMswouQ5w3IxFod6*MB=l*Bak>`s(fn|k|5 zrLtQaZ#RzSkmmA#%qqaXu&LOqayP_{qd9DgpH;xBc)Sxmn%aB!uSkG3(Zf{c-$n2c pw8K1$SyvUeSk{eq(}8L_@E4K7v@3XJrsV(t002ovPDHLkV1nlQaufgn literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/payment_phone.png b/TMessagesProj/src/main/res/drawable-xhdpi/payment_phone.png new file mode 100644 index 0000000000000000000000000000000000000000..d74d70a9da55bcb772232bf513ab52e5dde08352 GIT binary patch literal 994 zc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r1gvEh4RsPamu^w z*}e15|IStZ;LUb7>d8NIy?{7Fb5!32kiQQs-xXOBYwOs3dt=}(_ z-~HJrbb3-l{|g3lzFWtGXYXlUv)S{+L#{8p9hY-DPk&)|yT0W`eXr&@zqtvCO!+fP z4*O2ooL)M|B<1tPA6wtgzso*N{`U6P8;5@h{=LNSx8bi}&hIMQ#0?oa{ohm{Y?+?% z{_v^;`OC9cU;O;UwC33Tgq&nssa&S{x0xoZ@^QY1%*#~kerz_U;g?L#|9diDH|8*( zsxV}*i*DHt18x2GHKWLAHILKK6Ib7^n_I=8(Y6jykxt6^(WB-Ut{z`v;x5JLJaFa YhIh7)m`=M*a|h)EPgg&ebxsLQ0L3qic>n+a literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/bot_card.png b/TMessagesProj/src/main/res/drawable-xxhdpi/bot_card.png new file mode 100644 index 0000000000000000000000000000000000000000..b16909e05feb91de72cab9722b1d23f8253c13bc GIT binary patch literal 333 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbB7>k44ofy`glX(f`xTHpSruq6Z zXaU(A42G$TlC0TWzSWdSpS4N|DZ_xKNx+V1J%7!twx zcKSiiRs#W-UeyZWH;P~Xux;gy{$bm(^RL(=o)-r%H`Q$FK6B{NI_)zbgp^)dwQ}s4 z=&-ib>D&p~n^r44-*)C)j;smfKewU&!g&*u#Xl@&?|dRIb?aj9b?N8n3m3l1d8Bs# z{w@Yz3und|Cz?3^Om8@+*qy$k*rRPriWp<|I$ISdAa%|*WKF-+Id0yyysWw_r`m_d zT{v{-^sgzG*qkMID%eizpLONja`7o#f)#!b7_LlTX{plbmmdKI;Vst0Fo$h AH~;_u literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/msg_addbio.png b/TMessagesProj/src/main/res/drawable-xxhdpi/msg_addbio.png new file mode 100644 index 0000000000000000000000000000000000000000..aaf83b51a0ad096979b619872a6cbcd30347cf8d GIT binary patch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Yi+MiUMW9o(hi#ewcYy^7npkrTfYzVhxtASsWf&(ugh$AJ%rHuvDhaR>yeY5ID>y`@z9w?0c zV^HF)3gVN z3J!m|59HIH!hr`U_)b(0P#Y3SCh0CtvmbLrSL&nZijTF1FN7#6tR)4ko|RzAAixh?Aa@B8an3nmr5s!cD{)G#?&CYs>G^05$8t?;PCJqlsF*)2Pr?D)SaUO`HY}?9A2x7TO$XMZJ$K6{Y#w0 z*!(#t`9*Nvk*@(K@w-R*k|MXg?lM;A04)|R((AzObh>5s(+WOQxM%~$+x}C8T78O| zAUVguOPp{Rs>|>T%$*IJj3O_`zkPIH$>T{?f!KbnVqlkX6EOzzjQP!NKI8K4s zAJpmA%u8S=&@(Q5P@G!Nxt*dtMQ(ekWjtx(R&aTwrTQvR<|mo6v9|(PTcL;ZI*Cq- z^5h$C!<&`>>r!5AM!g^PUW~chz-yq^53(|^Q|SA9wcvZwxkEG0soHS7h{FJwrg|Xl zLv9f04HB)|wOvpg`fmz)X-i9otAW4Oft5)Qu>)9>)k>UtigAn6{w4BpKC*M13>9&n z{9}P5l$%YO4_^kUEt4B3?a7L}_;WGWP$Ol6(B!FL4}jS82M(5jBBQL4?vN2b8Oxq`VIXM)hL6^|ji4SWamK;aAK zji$dh88tz4s)|UMUbnd%=)FiKPp{bsTDa*gFC{?O4F*ZbKO9GCGy|g<7`Ykv7osm5 Uc&Y=rVgLXD07*qoM6N<$f_*8Y%K!iX literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/msg_bio.png b/TMessagesProj/src/main/res/drawable-xxhdpi/msg_bio.png new file mode 100644 index 0000000000000000000000000000000000000000..7a988c39edef527f189f39b28629b1f187d73e28 GIT binary patch literal 1715 zcmV;k22A;hP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91NT34%1ONa40RR91NB{r;0FW_8?*IS>9Z5t%RCodHoXv|IMHt3+ObmoY zRueOY$T{Bb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HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/msg_timeredit.png b/TMessagesProj/src/main/res/drawable-xxhdpi/msg_timeredit.png new file mode 100644 index 0000000000000000000000000000000000000000..21b2ff7b530d5f9fc29bd2d6d5e5fdf2d838a65a GIT binary patch literal 2185 zcmV;42zK|0P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91NT34%1ONa40RR91NB{r;0FW_8?*IS?^GQTORCodHn`x+3RTRg4YB{8q zrkDk4vsz%;XvtI5%rb+tBpZk#3Qa$Vp)``88o*3K%!DWdiOk`Hg+&fDP_G z6G7LrzL#iZb8rGAk&`$r1;ao^-4&Vsa5U~`kXD3aV5W&>Nk(!lfs7xq1-~1>W{`!< zfuvLHBrJ#2mm^8Y{eK4-0_2zL2zG;M45F`bj4fWnTHx3m$gvIR33`L;yrWCw_hCB; zyhkntj`<78w*~itx4|Y5CX@5Zh@ic|RIn#30k3X8N9pM71>$C)FL)Vz4gLkLvJb;^ zv(M@jqws?Vz*itlmQ&g8lxK=Fh&q8WU;)?<(nxKJRARZ3l};JHilpT z_&X#>+^Q*dj6BOE*8$81^61xO3(Dm4CY-<1SVMGCbC+-O?2sUC@*N3|2IT!C`ee60 zjvE3q@;so#e7I&$5yJDVP1?y)eX5+Y;^Wr-g$MuH3bUMl2cQso!yEMjjlCq1Rs||EDV4d(IR)`7Wh?E^95asBVik@Z~e-up>v5y|tnFirEN7=dPmH|5SeAp&A2reH7cr zG+R@r_+)+sNj&1*qQsK-%4AC-ILd6)78#FPnhiA1shb33WkANGSs?O?#ioInoLQX{ zq$$vrMzp&mIxJ+98)RN6EROQTrv(V?MB879k;@e%af$VT67K~wrv~p>W~Fs5Yr(ce zPSd&HkJ(NYR9>s(a)qgjyyOjIZGhDR7%mlmx>L!pyjmf3aXP5GLbg%Sok=RKgDx~1 z;M76fr!q^nM|T+;_L^j8;Q0exC#AYT9eh4dzF%`ubpu^X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-xxhdpi/msg_voiceshare.png new file mode 100644 index 0000000000000000000000000000000000000000..67f50d7708b04e63b089d6a397563c4741105bd0 GIT binary patch literal 1356 zcmV-S1+)5zP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91NT34%1ONa40RR91NB{r;0FW_8?*IS=mu)c;usRk86X=`sSQ$SN-Us@tpjq)uMQeN0O^gysFXN%OQ58=X5UUHvr9l)m~@6&1tcynqsu^AkR+rm z0}_|nMM(3Kf|PYY;xZR?Fq7sa0VxlF#AQCxa;uLUQeFUw%d1Ey?iq1H$`c@QS&Z6& zG%YSjc>^RaD^MGdrp5s&kATFb5q%A$Nh(CKyaE!F4d?=pCgc)Oaf!@|GB}QX7kz=R z&=VmN-H6Hme>elsP3R)D6zK+4uevJ5k>3{l44|DTI|h_`^cngY4WXp%WX;ooz+|); z>5)Y>pb+LcJ6e;FNO2BoMLo}@n@(Y0%|K%OQ_z0Yn+^-lsJl{!L~0+PF3%LxZ5Sc^ z_EaDdxB*>Bcl<`thw1fEB}j!z9fGtI@W0I&$LNV)7VKY=e7{gAeCw5L=na(9A#iq6 z_dUuA91TJHtc%4DR^>8_JcDpP5wE9EI%~RYNTDhQIcgm<>8kVSNPvLz5)RwY8mHq7 zmVX1#YtFnw11ioOEvYx1PBU8W2T<8_q$ua0GdY5z&-5F&4>lAaW{J{`W($%Arq`P@_HDU|UO!T&E2lL83Vc{r*FCf}KG|!`~r*^34Q3tw4l0#)Z zd@AVw7)XK{1<)b`43^3=-VYHyJR`(j(aGj(~o} zTQqJ%dUzI_;qL$nV`n+2;`!AiQNJa&*1$m*eOk~3rt+{s|DavM4Du_2>?9wZoFiLU zK)P&xj#@}WSDvIS=pcV2ku3>*SYu;kdQL!n9&=m&nOHv7JGpnn333kliT<(QNPEp7 z{j#FYW$5~PL>sOoXH98X(;1}us!imjTZvfBYbULrpg8R~74KCMjx)Yj`A-@)ke6;k zV>hoERQf*%eTt!Xq7gH$bdv7GzaCrMj~K`EaFZF-Oah^{>7G%|8~m2oJ>2Ml*IjdW zG4`jRP literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/payment_address.png b/TMessagesProj/src/main/res/drawable-xxhdpi/payment_address.png new file mode 100644 index 0000000000000000000000000000000000000000..39f1e849e9dca70dd35aa90c05395de937f24b65 GIT binary patch literal 1855 zcmV-F2f+A=P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91NT34%1ONa40RR91NB{r;0FW_8?*IS>sYygZRCodHn_Y-iRTRf(1j~;! zL2N9fVM>k30zu$Y400n4pz)q4&+3&yK`l9e9L)s2gUZwIc{_Rmk1Cqo6#AVrzfKvH~qG&Dn&rtR& zz6bMXv@41Wh|@P|d)Uq@*bDJYaL!l6T%rp3liO%X;&j{$H71QS8|4;q4$`!*)<7YI z8H%E5pr$ofCgpzB;GGA4xxzno^ae-cUH@cQYFvo8fi(Cgt@GllMr1*@%U8hsPp}}O zT&^k7;IuH**sffO(uzSj7g)cqcBbW&?ML6vn%0a?q=Snx?jzh@xNP_vx)85V$9`~sgFv0z?_wK-)t_>j-l{*-Wv#&o8+C;?Xt7ag(C}q( zJwZ^T<|H)~qu3aG+eot3V1$jjLL0QmsC35gWpQoJ669iH8)Rv-){rVCv_aN>pvN;Y zwj?0wwt(2`P)nP&hU%P}O$P3nGKw!}#K&}7)kifsjJ;5-tDm<6frE+2 zs&QN1JY)4BSzJYw9RAHgaX$dZ*uxH_2}ql7L08gYtVF{$>@zZdG`LW~3DRWf94?r4 zq(Qq4;-SKc0}0SLWa!)-SSCCi(iH}=Tz7|8D<(r)QZ%k8hS94E`7uMlAup_DQ?wm2 z^yx2SIR^Q9Lx3Lt>Q$ANnlu3GQS|!Kgdsq8>&^n-^u3R|>diyExWPNVDCW`{b=Nam z7ld03A#yz)U9`zWxHn0FVNW($Iy@Z_Q^0XU%msXU&9_t&ClI%9(ir-SAs_7!uk_Wp z`K$RbWUm6R?p<59GJBN*B2o03r3&As0_e<=aBWP{aL`OB(}^%W3;)Rws3)7nUe>cv zI2HjtPxDQh7L?hGR4#<9_0_rgM~qFsmzYLO?W@3tj>{j`rRBB6kGeg+LO0)6lpyNw zP2r5a16h>Rk&n9GIQuk3@H2Tc!}D|s*Jt?4f1@nR0ui;4h$kxxgjzaaejTB(7SX`_zb z?0v4bn6sc;!FSeb@oDqzPlR&37+6nFa94f+w{ literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/payment_card.png b/TMessagesProj/src/main/res/drawable-xxhdpi/payment_card.png new file mode 100644 index 0000000000000000000000000000000000000000..14d8c8087b737d7756adb6eb1da6b764ff72e60c GIT binary patch literal 692 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(<^v49!D1}U6i==Pq0fl1EO#WAFU z@$GDXufq-^$9g@&;|}zS3)r-9FPvWRRJMwHci^s%a!uU)ieH%aI^EUC_#>C*C2agt z>W{N<9dm!mr?};x|9&csDk&;(Xl7thU|{5MU|MLAtQ;`pj0!1O>f+s*=JUX%YzD*c}> z+kWQ{e{tulU%h?Ft-?ai(HUp9t!aKTFQRy!C|^?9hej1Ulk=bNWlv%_D|+_ZDsJPW zCmoLDFOw`@_e@S|R_;E{J6~Otb!IPKVSoGU*WXd%Qc)#e|GQmQcs;F=?fIN%y_1#| z1Z`eByL9FKt!z_QYRG=IJbP{VEJc}Szv6k8xykVjvt_EjGp0-cdaA9#^RWW+ixW?> zUv9g)Kg{3|AD@xAr~`u$i;on$q{CjZmv_z=ewM4A{_b;XbMu+E%mNKOjFXQ!LKHBb z5HQG;VNq~Cu%wWXggt}E@2+g$`Zsb%*;dV3vHqO-+Lg;rJFX7dQo84smHeyB*==TP z@BVrsW>&}*Smr&KVIyxu!zOvdzmpBh>hyNinsvQdbm^9s+Uo@?rgcAxWRr8va9!T5 zBz@k%N3^`_#zZ?%Xa_$pmQvhy*)ecJ)K;~R79mWB1fj78kHCLD2h^9Z{JWpy$|7A* Oit%*yb6Mw<&;$Tt>jSp{ literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/payment_delivery.png b/TMessagesProj/src/main/res/drawable-xxhdpi/payment_delivery.png new file mode 100644 index 0000000000000000000000000000000000000000..8ed8b265545e1265138cf9695c2a147c2fedce2a GIT binary patch literal 1544 zcmV+j2KV`iP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91NT34%1ONa40RR91NB{r;0FW_8?*IS=a!Eu%RCodHnp=ofRT#%-yhTle zrO}Nn3(~IGgA@q{4Js8VI2CH;Lr+mrU_DE|_2Od$8I}(g1%*(A(S@k63!x!}(S+JV z7c7fXyNqS0-+yK^v-fwtea_zd>~lQl?DfH)v%YVw^{xN<&t7ZxUV9G=1PclT1%d)W zfuKN8ASe(N2nsj~3_7ufp<1mrhXxD5h2R`;I_(&P9|2>7gM+8qK_rtvh@y6PfqTG8 zFa)~Ejzi`>unp`+tp7Sj4smV)`$4bRUWhL3h(HXq3H;M5%EWk{q`bPVA~C?@u>pIr zI1cICTNTOOgGhV_iC+gZoB<9H+XcqJZ%%!uLgIc2xC-cMxeQqQo4^Y8q&>Exu#Y%% zz(HW`IDtojCtBh0%IFBE+28?i3|RYuz|1nnnaDx12ki*>8hBA@gS06T9G690`AOKi z(uO4M`-#+(&c@OPXmcXyZglwXE@fB}&jqK<03Vi;yhBOgJ`>n2LjTo7jEkLK-#W2w554ISyv>O<4OxNooMmm?2718X2gjcc z&r$?3IeXJ(nblzamSMk;eJJ;TVtWOdoIUN9vdsEfAYDPalH#T(gk09Q0y`JB8AkusjPj&lUpy!$S2{Zev@!vqCOox7bEfCA>SHyV4 z2qgC=unUpA+nPl4z7|L`MWh}4JfpHP9UbpPq=p(at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ipmap-anydpi-v26/ic_launcher_sa.xml b/TMessagesProj/src/main/res/mipmap-anydpi-v26/ic_launcher_sa.xml new file mode 100644 index 000000000..bd195b5c4 --- /dev/null +++ b/TMessagesProj/src/main/res/mipmap-anydpi-v26/ic_launcher_sa.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/TMessagesProj/src/main/res/mipmap-hdpi/ic_launcher_sa.png b/TMessagesProj/src/main/res/mipmap-hdpi/ic_launcher_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..fede4550b3dda0677bdf8536deafc2dab3421543 GIT binary patch literal 5750 zcmV-+7K!PJP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91NT34%1ONa40RR91NB{r;0FW_8?*IT5;7LS5RCodHTxpP9)p0)eZL_^u zw9jal&;}9-l97Xi&AyZ|ky#8v!od|viDM-$u;X$WQ@9*cB$NtpNJW%c48{fphah5u zB`k=HgII;NAPFrXjWi=P(kz;Nd)rNaeNNwZ?tSmgyphKL(o^?#pL4qVbbq(cx%b`o zB&GhJhD5*_a&+_uWxgPnnWW#94#TA#wOZ%RO;?>Xxca|DkN_2CHiXRVY181|8& zHV(T_WZQ030HOUvgw(b74gaCEjC4%IkLC{CDF=s z_3RZTwx-KBIK(gx2*4h_0A2+m{-+*GRGP4sRXY-@VC;nA;eZ9j4( zN#iLxf)%Fi&hl(#KT9v!r2=43DUox(`_!z8^S}6wP(}64R2_8!hU6QZad^P8pu(1c zbu&%r-p-eL_q_G^{)g7oQ#XJ@b=gainrBXD3lQw(05H)7_dUO$a{lMP6Dq5|h0=&- zLxUR1MWz&4N@%$8tS2qm`c5*_-|=Gi!JUsBxc}AzG>)nQP;f2>i6bY8cI1|RU?Nj) zS~IS8#dq(GR*hXlOCzF(1q8Sk89cYixQPlY*Z>q`faMrUrMlXlYWmGX4}7-qsW!5b zih^e|F*`5%bfy5oPL@;21^@o;O|gkHA9TW@S}uJW3@$0zP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=Zl zAnUvI*o7Y_gAQMR)do9_y5o{#N+^Xqu)r53-~)Mq4~%QlXd)?w8m6)RO!yjWrs(B7 zU|1i*FSz0uePnQ5L>h7NStvepO4^+dH!Uq&3~|&_EDProHx7l+4-;<@1HpjW3|5}G zE4nAffLeP*wl>BeXd)YegER!^muDn$Nnd zU}}kXxYB*Ulad=>dc6CDiWrJT_a3s4&)2V3`~AqhiIdnMMz^wL)U)LK({wk6t1W}Y zqj!@>WeqE|E&KU6O{~4~RgE)BAPL6rU|sf!#J-i8;}};9op}HjG;fIbw@hrm(L2Y1rFszw z=_`HVN-S!{*~622&E{q*!xOR`3HZWA+pR{{+cCwi+qP%5t2HNf(xn$GH2ibE7f1dc z#AtXLh$3)dPZcW3JGwWE;~l7k`ow*_!D*Opq%Sdcl5i3|)oj=Di=1voc z$Gsqt>KU6Ip)i#8dCampN@rR*?c|HDvpaYLTDSli61ZW7(HR~exTdg zL+mqK2OSW^@#kqJTnb{h3Jv0t)j!l_go>NVlUZsyidbf9RofO6L9842+uC~LS9jwA n@(kiwkc)Fk5Ro}zmL-rU>V2|i1K+F87sG(3LXBqN86+2m% literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-hdpi/icon_foreground_sa.png b/TMessagesProj/src/main/res/mipmap-hdpi/icon_foreground_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..188a738cc26d9d689696f63d10691e9603c2ebba GIT binary patch literal 1857 zcmdT_{XY{37~h04A4Q}x(aSoo7v*IslWNSWjfjinWSBF_OBP8h@>Z7NFmzs)658^T zm$cF$CK+dK%Vnq=810TY1)wqYXV(XK&_!f03I#A-_getK)ZYNg8`Mk7)Sd!pD%B9m3V4tb?Q{ITf0zUN$chq?<>S@TkNp27< zJ%23LL@cb)l2^jgGMzTj#+${ELDEY7^^D`#*~o+;u1@KSAV-9x3yT8iXR_FVxby%y zmetl(tO6_yRO31>=Z28IUU$g5s_Q)_mRVHW(E2b_-dKsv&QdKtwMp2$aJ7)aViW2o zw5QTC9`bNV^94Me%>IhiP?<@In+kOoOxHataKKC_69YfDKGHWHuJj*C>GT<;r317b z(Bl2S>YTe>;7O=uIoCbQx-b9h9)VOh+0uD))F2AjG7i~pkuSN+`ZVbQqJ{kw!1XMj zv$}%MsDKVG{Xp z!nh}I+VFk8CVD~4TeILfUV9o6GGFChx|(-bqz!SvuO+az8V{W)eqwOIil$-(&l^L# z!{l!Z*h@mqEtV22ski*g*?k8=U1$#TJFz({HRhX+ctr650T#u_JF1Wezc0$7A#5u* zziPO`2q|9D6B#gguiB*F{i&FK74rC?>A9$i*W%#zZhLi3??KlXpXWXEhd#vn=5Heb za`eXJ^V6|;{0B00L5!sMy6^VI&_%h2LtMod>3(4FnyM7Ht!3OS)Nfc&J6ShQG_c2e z4ZI-fqTZEKF&y;X$b`HvNgxY19DT;#yOmsi8%N5v>f}%`5hHg%mdTOS#%%j@{3c#_ zSN>dt(`y!{2*W^(=vve&p5nXstNS$l`L6pUeI^UplqN3!n9M;sW)vhvXI|xF0(dSb zoNw)FT0X!Y)K68qPfKqaXF{+!K~o`8jkuDq-C(f1pd>j-udD9Q9jjbCpi?9OlpD}XT(r#Yj6#F*$XlK^N?6s5iCtWHQMJp6X$1{Ar};BiKAZH@*j zHzGUV;drCn6+6-d=v%Pf^IH)+2soOhD?Lo?|4qhtGv%M`PQ{OKLd$w|jCICm=PpPi zWh|d$IZoZMKNmEm)_+}{p_u9eX^`iK`)))?(cRPS=8i_xy(NKrJo&y*bbZ3K zt_cMV$G%y6o`;#?!=4`w#q!SuWJLRAFF9*RvfdBvi literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-mdpi/ic_launcher_sa.png b/TMessagesProj/src/main/res/mipmap-mdpi/ic_launcher_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..19df9e17136d9776d54aae896106b02a7a4e7d4a GIT binary patch literal 3179 zcmV-x43zVUP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20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/res/mipmap-mdpi/icon_foreground_sa.png b/TMessagesProj/src/main/res/mipmap-mdpi/icon_foreground_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..e73ac3b18c97ead3e516ef8dd47304c3d7914261 GIT binary patch literal 1178 zcmeAS@N?(olHy`uVBq!ia0vp^IUvlz1|<8_!p{OJ#^NA%Cx&(BWL^R}E~ycoX}-P; zT0k}j17mw80}DtA5K93u0|WB{Mh0de%?J`(zyz1gS-^~7gB1R}eM^pkfrZ7>#WAFU z@$IeCtA*2L+6()m){EpTtnd)Ms3dokThCRXB>13StKJ?(y){9FPvsRvx)iit9BX}W zsC5CyBUaa?+Jy@jh?#4xP^h>br2kcDez-s1;W=kiCZAE9eDd?5>pp4EYCrFrFK?Nq zCTVnJSpyT7#scaQ7uXu-ne9nSjNcTr(kHoS{{+`1PT#(M`Euvs#V`@ZE|Y0%)Tf^m z7s}nfq!o%nm$p=+_LxS5#}d>%(8W%R_u%mj!%?* z636`FV(_`oDQc3Qd9M5_IpnpQm-1g(&g}J^rE@nM+@O{@!iA}A4KHt^< zykGz2#&uS~+uSDzOS)M`zkQwD#jxP=$@xzz+3x&U`S<;*4?!|K*sVZZT;i8ZbH>j?(3nqPc%sHdh=Sf-&6ao zS5B3kudqWEQ>1s_gxyPS$!!qar#3TWwf%4LN$E?jmTkE9<6U+D!`}j5GrPAXefkP( zW4JEt-T!yqx2U%^*96O7|5Q8^J;5o5y{hy~UJlotc zzbM8dvA!mFTGQPH5$45OH-zt9^e>ju{+{R+XwYDJbgrmm#L(dJSHabsPl#m!H zq8nqqR_XSM`Xx8RUNo8RUg7lpv9rgHf`7aJ8^>?!G8@9fh)YDd_ Q2PzjlUHx3vIVCg!00V*VrT_o{ literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-xhdpi/ic_launcher_sa.png b/TMessagesProj/src/main/res/mipmap-xhdpi/ic_launcher_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..88fad92c5c9b9b24fd4c27d4443d553d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}f>Fn*6ChyQW^9`Tq$1{RGQq z>J0cqJHIvlNsf&m+Ie!i-yyXD*(_*%M0?Gh|H$UQx7KU!JQ+}{Xy;jfPkYUse{cEU t(C9UHp4h$S&a?iW_L@8Y-tv{k{|CY}ewFXvmNftX002ovPDHLkV1g79i1Yve literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-xhdpi/icon_foreground_sa.png b/TMessagesProj/src/main/res/mipmap-xhdpi/icon_foreground_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..ac5945bf84101821e815e748cf8c5254987db435 GIT binary patch literal 2868 zcmeHJX*(N;7LJr#qNZ0(xwY4nG*QdgmneglG>NpK1})LC?@Nl3pkZ1ww3bAKSUWXQ zOT$&76}xsuEa_q_u~e5J5~&et4X)k~_kNmRaPNoryze>Z{dAt^JkR^{Wj7ZEkSYiO z04Ts+oiT?z`316nJFGuz8;A}`3WsrV1TZ-2ONWhfkQY1{g#thiwJbm?D-0n0#c~MM zLjV9rs-yr%4q58UtP1#_?PS%F|LQNsWr1lp0063hJAdbKOG-40e^ec$arDn8QQ=Y1 zerLHRCtI5{PJWZ)c+4bo$|UrGefuXJ?gd0n2Jm##E7={F_Oq`kcR&WZvY~qg^sq8wd8j~PV!>;V)EOUF#8aWE!EVrMp4`0 zHb4p}E&KQXi@!R8!zQr4y)xs}y08CSS87msSy34Yrps*)AFDgM)_C!D&lw=3E<|tT z5(A!iCNm11w&fE)c_x*mKs*V_&#;DZi?36cFI{XM@;pj zYrv&s>@i3o+|u4;G}c^w#yx`Xq+)l{b*#hK9iQH8ZLL?!ifUx_dkfLTkx4t+FFxf? zDY*C>;;Cx(gpHQ#!PE&LC{nI0tQ~r%)o`s-J2^(&QM8bTMSMhxj6sp%EA4wq=o{tb z2o+s5G84PinRIYYl2m*fsHQjiQ3RigPG9O(PqCAc85gobq75%xb;EQRZeMOb4T)ij5G@|jrf&Dk2ebKQRI|8B z$+vq&b8{61gwwSTAx)rc&0eVXSSJD`c)q^f%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@8jsQJ}0vv;4G** zwxYCfVx+?LZYye*^M)@?zphQWx=$OfAz{Jun~x8@F_(7MQGM==$eq8+0soshDN0VF Y^2k*aS6ltvm*fk8UvP6~IQnP&3o~@LA^-pY literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-xxhdpi/ic_launcher_sa.png b/TMessagesProj/src/main/res/mipmap-xxhdpi/ic_launcher_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..f8aa06f8f0ce18f7269a862647a94e5a06c3f308 GIT binary patch literal 15490 zcmV-|JblB7P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91ke~wq1ONa40RR91kN^Mx06#wphyVaP>`6pHRCodHeF?l>Rdx5d_sv7{ zUM51qm=Kgf1{DwuD5!vl`k|;OplI8Vwp#74T8s263OE#p@>S9Ll@7LLP(Z9R;J_e7 zAb<)K5D1ycK&F@Ey_exl-}vF8g+uO6@<0BqJ#6Vh%=f&q6Bo8Nz z5IQ`br*ogB`NZwBK{&@5PaXu#(|Jt@HGbZyO;I+2hrs;-=DcgtJp{f_4<>A14uUaw z2;3hks9!~qAxH6dyK+VfN1L*V<|K(hA5LBBl&&V~T2bkrSq z;iYprk33~j{mlIr)i<{oj44%%Kjs%2zv zaGX98qDg?4HH*;d=Dqzxv**6{J&WsS%sI8Lt@Aa7y81n>-e);YD*Zt=|Y!Xp66Cs-lDuH8AJ)u$evUAAL zUgnj#L*D>-z*+7Is+IvO_ zdGB#ZJfTm3JbdHS3%$Ort*!phPu_TH^T9{ItD$}Rn`KRDXThTdW88yd@6>9~uSjr4 z8#YP0`?|ONWY?-EZ(VWqh4=OJ^q`S=>@$tTVvT!}N1>3uuxS9%INZ-@<8&T>TKj@O z{_^`8XV1GNDK;Efi=DXO>1q*P(*Q8Wmw3!yts$%NQ#T;Sko=R?NTCr1*6i81=DOwo z_*d6={q`QNN`7VX`y{$as4AxF#F(baKJC&EKr{^?8>d0=`Z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aGOm-D5R+yEZWq0P;Qw%v55eAYx9l7y%HKJ#oLcw zJhSt(^G|A=f7po)owH9UG`1WPH$c8g-%`X`Be+0X`3e{7^Y-w+jO^dG`H?+qpMSXP zo|~6+KY2gCqvIRJl;{gQ`ls=DbXo;A1Q z)#skrH1E(83auTBicKvCC&glW=}ju~BwDe`?pYCgdO0}IE$ z)}u~7v|;XoL+hu{KBU;%Hm^{qZ%^v$TMEUxR@qOrCUu4*5%P(5ul#k|okN3zy^8nu z?Hn4CX6fCru7CTcm3)qX3UsVcex5j>*CUtdiU*tng=8@Sxk|A3fM^O{V}&6tuUSCzdc1C# zN^Jq(YX^(5*E(3iG5YPHZvx*OG0sLKKN|?w{>U?pBF6_ChRxuch;ts2k9uGSI0m6z z?E_~dY+oOY!9(8&z}ZBkvuOxPM=m@b=O!*XuhAgD35ok_@&aPS(5U;^8Oi#eG#F1F z^o>E>L*yZri*pkf-8Ths$Pmxt=X|VtpS)(m_DSb!aN5U5Jcdw1T8!tJU{hc&4=0T< z=F8K$&(eJ2_Sqmt=y)7+d_6*SB~1ib-#8=Hwa@YYf6xTOgM(ro%>V!Z07*qoM6N<$ Ef;2q@_W%F@ literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-xxhdpi/icon_background_sa.png b/TMessagesProj/src/main/res/mipmap-xxhdpi/icon_background_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..1bbf66361ec3be269cc966519b643a68c53546e7 GIT binary patch literal 33126 zcma%jXIN7~yDbokbm<^Xkt!k}BArmJU{FM=1W~CC!^)C7~uE$-ePB_uTX6{J77<&d#3w4jU%(mRV~};>_;dWM?_YLPJBte*2cu0~#7y zqkqR4MrsRm^JX{oMC3b+pzBz4dzC-ZYkBOVC|6CtEe$s48cN|JM1i;4n6{CS-TJ{z z-2l?G!p6T>)lkHX$6sD+3Bk_j3+o<`Qy7hne`r>_c z?Pt3ixJ+8MGh-T_jl;Y6bSNn4vG*`^lavxQ%bSo{vkbEh+iwxI!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&AIs3U>Q^eeDg)c@8QQq|&i=>lzJ0^>|9Y=Hzvq2D3%r@4N5Qk$ zJ*NBOVA(stu`iwp9%{qzd@k`KK-(__zZgK{O27q>!=1C{chA1?Z725}al+{xGv+^2 zzOQ_u%z9^BkW~fPFxN^LP+;{u>8~**Cp$)6?!88_o5yk>Q zfwPZ0J+Uu%(hPi`E_^28i-x>?9s8U>vki=5C-w^hMISGUcp*@}z4!3r`er=;@)JAf z9)4u|)R{-L^-ev!t-JT|Qdjo^*(;&f9Qa!lXvCL{A}gh2SpH)As`9S>rRDyuONX~^ zTr#wF>EcZ{fBpXcr4Q{C6%;cIn1xLo7rU3G4hkDI3w*yUe92FN#liOegne$Lf&Iav z1_qxCfqb@O%zlqca;4~+@$8o$+I83oM|I9xaClo!-<+hqb5g0jy|2{XDMv?NQUWc1 zG_Xyu92jtU1i4f0(RWsc%R7?_@NPMVoE&E#*_g+)@Pv;YiKwH0Dr#&7RG*;m`lj#NE(6wfWd=U!{SISN4kYmTl4fDX7==q7iy!Tn zCeLH)#Ta7^9)UE9k3gCQS%guv;1^-fBkg62?7=tq1W%K{led9306c=H$=k1SqsiE>lMl)HF({(J z;{g@Yjj)#`4Ge&85%>Zm4IINr}`CHr)u+ s8_Rlq&P0x^SIqVLa)u5vibvr82T0k$y|T(e8UO$Q07*qoM6N<$g8HEPX#fBK literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-xxxhdpi/icon_background_sa.png b/TMessagesProj/src/main/res/mipmap-xxxhdpi/icon_background_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..5d9f485f5afa1bb985039d0a2b408bdd164a52dc GIT binary patch literal 51199 zcmc$`c|25K96xLqLJ`WE2vKN}-4LQIqf~aIRJLT_nL(D2ElIMBC0m5DZ!@wl*|HPE z*mpCw+3#6=^Y`<-Uhci-p3gn!+A3CqhAG|g)qB$)%Lqi+wM8j|@Lf!bO8x0M8 z4lNBm^+Le$Fzs8QMm5;&wWUD`| z*<{83`joUe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7;BgO@j*5n;)8K_bynFK@b-kUx&c z;15TkHTfnbVQkQvs1Jr!s~NB^pgFmLPOG{ET+EpRt@dHaB zjf^$Bj!RgF?Q1}bFLx=(m+Ku3|IcgO103smNyu>h45PW^eI&*K$0Bf-pKgL#o&nD% z$hDi@zGm^sh#7nX|1NPX_`V7BlfoWb$-{dDO?G@#QjOU%aK;eN6+zuUpjWg36ov%i cCYT7`7JmEo`A4w<65vDUq2YrH4V$q412T7W>Hq)$ literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/mipmap-xxxhdpi/icon_foreground_sa.png b/TMessagesProj/src/main/res/mipmap-xxxhdpi/icon_foreground_sa.png new file mode 100644 index 0000000000000000000000000000000000000000..07c31a0935803502772bfc93faa2b0fca8c4a013 GIT binary patch literal 7553 zcmeHM`9DzsRE=XqY+d0w0eLZ1V20m8t*z+q^h zXU4z)DnD*4CxM=C2)Qf31@y>F{{}-@kH7-(pyz@#bcMqijs+|XpePRp#^WJCy8tu> zh7&m;h7-UQbljH%{vRo*JmaW+J{ElF|Tdq4?ak^ zp2EY#%X!X8K4-j7G|B%us}yhiMUF33d~ZF+?-~urb-PD%di_+Ee`^S>?CLV?zMph6 z+Sb6yR8imLzTVpM-Yd)LWViaxYg<{r*Ryw;doe4IdXDxZvX9o^PKEYpZjE#BD}otW z&Isv5GJyWQ`4@zLE#Y4;_&?mKsA}Eo>r(BJqD+$}y zltkh)eiiS1*Uz5+iDQl-U+LO~G_HEAbY~`%yHUnxu;$M3%5r%OXrotX zM4~zuNz~PYGsl%| z)vJD1?_)NTOm%K29!Jcva|X!`Zj^7tXSm1RMctcG%WelNLp4UFNZ5|dw0rz2%p=T5ms@v`O0lVc&<{QaG_r3<*@Oy z>1()iVuGamv1Bz3WnC&Z5P2iEtZt17_Var(GwmKS_gy#B749nmwAx&t)#+tI!}Kbf zWvgq8-!!24SDOLF_9T)BCQN2^n?~N~DsvyzvPM_-QViOi^}AaI7&7A2{4j=)4wkUq z>H_PF75Qq0c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Lvkq@dGc7jl!fW{?zR080OzR=9XS@8T=lTparp&I386L zj(bHNQ$)9f;=zGVly)YbPp|a}5;u6Yf;zkdsk s_vBxq{9h3MPZ8z+PYetrue false - @null - @null - false + #4991cc + #527da3 + #808080 + #60808080 + true diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml index 6e5e94ac7..531d45515 100644 --- a/TMessagesProj/src/main/res/values/strings.xml +++ b/TMessagesProj/src/main/res/values/strings.xml @@ -68,6 +68,8 @@ Postcode Receiver Full Name + Tip + Tip (Optional) Phone Number Email Save Shipping Information @@ -89,6 +91,7 @@ TEST INVOICE PAY %1$s Payment method + New card Payment provider Name Phone number @@ -113,6 +116,7 @@ Phone will be passed to %1$s as billing info. Email address will be passed to %1$s as billing info. Phone and email address will be passed to %1$s as billing info. + You paid **%1$s** for **%2$s**. New conversation Auto-Night Mode is off @@ -649,7 +653,10 @@ Collapse Expand Sorry, public polls can’t be forwarded to channels. + Sorry, invoices can’t be forwarded to secret chats. Sorry, polls can’t be forwarded to secret chats. + Sorry, games can’t be sent to secret chats. + Sorry, invoices can’t be sent to secret chats. Multiple Answers Tap to choose the correct answer Polls in Quiz Mode have one correct answer. Users can\'t revoke their answers. @@ -1856,6 +1863,8 @@ Ask a volunteer Telegram FAQ Telegram FAQ + Telegram Features + https://t.me/TelegramTips Add Account Select Account https://telegram.org/faq @@ -2864,6 +2873,9 @@ Clear payment info Are you sure you want to clear your payment and shipping info? Delete your shipping info and instruct all payment providers to remove your saved credit cards? Note that Telegram never stores your credit card data. + Payment info cleared. + Shipping info cleared. + Payment and shipping info cleared. Websites where you used Telegram to log in. Shipping info Payment info @@ -3032,6 +3044,7 @@ un1 started a voice chat You started a voice chat Voice chat started + Voice chat scheduled on %1$s Voice chat finished (%s) un1 invited un2 to the voice chat You invited un2 to the voice chat @@ -3465,6 +3478,7 @@ %1$s members talking %1$s members talking speaking + %1$d%% speaking listening wants to speak invited @@ -3484,6 +3498,7 @@ New paricipants are muted Share invite link End voice chat + Cancel voice chat Connecting... Leave voice chat Do you want to leave this voice chat? @@ -3492,6 +3507,7 @@ End voice chat VIEW VOICE CHAT Voice Chat + Scheduled Voice Chat Open voice chat The selected user is already in this voice chat. Sorry, you can\'t join voice chats as an anonymous administrator. @@ -3500,6 +3516,7 @@ Join voice chat Hey! Join our voice chat: %1$s Invite Members + Share Invite Link Remove Open Profile Open Channel @@ -3553,6 +3570,20 @@ Are sure you want to appear in this voice chat as your personal account? Voice chat sound muted. Voice chat sound unmuted. + Members of this group will be notified once you start the voice chat. + Subscribers of this channel will be notified once you start the voice chat. + You will be displayed as: + Start Voice Chat + Schedule Voice Chat + Start Now + Set Reminder + Cancel Reminder + Members of the group will be notified that the voice chat will start in %1$s. + Subscribers of the channel will be notified that the voice chat will start in %1$s. + Starts in + Late by + Share + We will notify you when it starts. Manage Invite Links You can create additional invite links that have a limited time or number of uses @@ -3759,6 +3790,30 @@ from %1$d chats from %1$d chats from %1$d chats + %1$d seconds + %1$d second + %1$d seconds + %1$d seconds + %1$d seconds + %1$d seconds + %1$d minutes + %1$d minute + %1$d minutes + %1$d minutes + %1$d minutes + %1$d minutes + %1$d hours + %1$d hour + %1$d hours + %1$d hours + %1$d hours + %1$d hours + %1$d days + %1$d day + %1$d days + %1$d days + %1$d days + %1$d days %1$d seconds %1$d second %1$d seconds @@ -4299,6 +4354,15 @@ \'Send today at\' HH:mm \'Send on\' MMM d \'at\' HH:mm \'Send on\' MMM d yyyy \'at\' HH:mm + \'Start today at\' HH:mm + \'Start on\' MMM d \'at\' HH:mm + \'Start on\' MMM d yyyy \'at\' HH:mm + \'Starts today at\' HH:mm + \'Starts on\' MMM d \'at\' HH:mm + \'Starts on\' MMM d yyyy \'at\' HH:mm + \'Today,\' HH:mm + MMM d\',\' HH:mm + MMM d yyyy\',\' HH:mm \'Remind today at\' HH:mm \'Remind on\' MMM d \'at\' HH:mm \'Remind on\' MMM d yyyy \'at\' HH:mm @@ -4324,4 +4388,25 @@ Cancel Forwarding this is you Open Chat + Add Photo + Add Bio + Edit Name + Bio + You can add a few lines about yourself. Everyone will see this text. + Tap to add a Bio + Edit Bio + Add description + Edit description + tap to add photo or bio + tap to add bio + tap to add photo + tap to add description + Tap to add photo or description + Edit title + Title + Set New Photo + Bio updated. + Name updated. + Channel title updated. + Channel description updated.