diff --git a/.github/workflows/no-response.yml b/.github/workflows/cant-reproduce.yml similarity index 57% rename from .github/workflows/no-response.yml rename to .github/workflows/cant-reproduce.yml index f414a55fd6c584..5c4edcba0fb0c5 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/cant-reproduce.yml @@ -1,32 +1,11 @@ -name: No Response +name: Can't reproduce. -# Both `issue_comment` and `scheduled` event types are required for this Action -# to work properly. on: - issue_comment: - types: [created] schedule: - - cron: '0 0 * * *' + - cron: '0 3 * * *' jobs: - waiting-for-answer: - runs-on: ubuntu-latest - steps: - - uses: lee-dohm/no-response@v0.5.0 - with: - token: ${{ github.token }} - responseRequiredLabel: waiting for answer - - needs-user-action: - runs-on: ubuntu-latest - steps: - - uses: lee-dohm/no-response@v0.5.0 - with: - token: ${{ github.token }} - responseRequiredLabel: needs user action - cant-reproduce: - if: github.event_name != 'issue_comment' runs-on: ubuntu-latest steps: - uses: lee-dohm/no-response@v0.5.0 diff --git a/.github/workflows/needs-user-action.yml b/.github/workflows/needs-user-action.yml new file mode 100644 index 00000000000000..46ad9f87d82d16 --- /dev/null +++ b/.github/workflows/needs-user-action.yml @@ -0,0 +1,16 @@ +name: Needs user action. + +on: + issue_comment: + types: [created] + schedule: + - cron: '0 2 * * *' + +jobs: + needs-user-action: + runs-on: ubuntu-latest + steps: + - uses: lee-dohm/no-response@v0.5.0 + with: + token: ${{ github.token }} + responseRequiredLabel: needs user action diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 4f133ecaf97e65..a78b1b50470ac3 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -65,7 +65,7 @@ jobs: uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8 - name: Telegram Desktop snap build. - run: sg lxd -c 'snap run snapcraft -v' + run: sg lxd -c 'snap run snapcraft --verbosity=debug' - name: Move artifact. if: env.UPLOAD_ARTIFACT == 'true' diff --git a/.github/workflows/waiting-for-answer.yml b/.github/workflows/waiting-for-answer.yml new file mode 100644 index 00000000000000..5e5ff87c968cd3 --- /dev/null +++ b/.github/workflows/waiting-for-answer.yml @@ -0,0 +1,16 @@ +name: Waiting for answer. + +on: + issue_comment: + types: [created] + schedule: + - cron: '30 0 * * *' + +jobs: + waiting-for-answer: + runs-on: ubuntu-latest + steps: + - uses: lee-dohm/no-response@v0.5.0 + with: + token: ${{ github.token }} + responseRequiredLabel: waiting for answer diff --git a/Telegram/Resources/icons/chat/live_location_long.png b/Telegram/Resources/icons/chat/live_location_long.png new file mode 100644 index 00000000000000..847930f549c6a7 Binary files /dev/null and b/Telegram/Resources/icons/chat/live_location_long.png differ diff --git a/Telegram/Resources/icons/chat/live_location_long@2x.png b/Telegram/Resources/icons/chat/live_location_long@2x.png new file mode 100644 index 00000000000000..d4c0182008a996 Binary files /dev/null and b/Telegram/Resources/icons/chat/live_location_long@2x.png differ diff --git a/Telegram/Resources/icons/chat/live_location_long@3x.png b/Telegram/Resources/icons/chat/live_location_long@3x.png new file mode 100644 index 00000000000000..3a8cd36b53d105 Binary files /dev/null and b/Telegram/Resources/icons/chat/live_location_long@3x.png differ diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index a4b8462a8a65ff..8f453ba4cb7eb1 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -3092,6 +3092,15 @@ https://github.com/rabbitgramdesktop/rabbitgramdesktop/blob/dev/LEGAL "lng_unread_bar_some" = "Unread messages"; "lng_maps_point" = "Location"; +"lng_live_location" = "Live Location"; +"lng_live_location_now" = "updated just now"; +"lng_live_location_minutes#one" = "updated {count} minute ago"; +"lng_live_location_minutes#other" = "updated {count} minutes ago"; +"lng_live_location_hours#one" = "updated {count} hour ago"; +"lng_live_location_hours#other" = "updated {count} hours ago"; +"lng_live_location_today" = "updated today at {time}"; +"lng_live_location_yesterday" = "updated yesterday at {time}"; +"lng_live_location_date_time" = "updated {date} at {time}"; "lng_save_photo" = "Save image"; "lng_save_video" = "Save video"; "lng_save_audio_file" = "Save audio file"; diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index 7854bed5db22b9..63b3bd71a25af4 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -10,7 +10,7 @@ + Version="5.0.0.0" /> rabbitGram Desktop xmdnx diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 3f5315c017e315..df66cc2067dfc1 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,16,10,0 - PRODUCTVERSION 4,16,10,0 + FILEVERSION 5,0,0,0 + PRODUCTVERSION 5,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -62,10 +62,10 @@ BEGIN BEGIN VALUE "CompanyName", "xmdnx" VALUE "FileDescription", "rabbitGram Desktop" - VALUE "FileVersion", "4.16.10.0" + VALUE "FileVersion", "5.0.0.0" VALUE "LegalCopyright", "Copyright (C) 2023-2024" VALUE "ProductName", "rabbitGram Desktop" - VALUE "ProductVersion", "4.16.10.0" + VALUE "ProductVersion", "5.0.0.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 2dc66ae509f941..db738e2e162385 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,16,10,0 - PRODUCTVERSION 4,16,10,0 + FILEVERSION 5,0,0,0 + PRODUCTVERSION 5,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -53,10 +53,10 @@ BEGIN BEGIN VALUE "CompanyName", "xmdnx" VALUE "FileDescription", "rabbitGram Desktop Updater" - VALUE "FileVersion", "4.16.10.0" + VALUE "FileVersion", "5.0.0.0" VALUE "LegalCopyright", "Copyright (C) 2023-2024" VALUE "ProductName", "rabbitGram Desktop" - VALUE "ProductVersion", "4.16.10.0" + VALUE "ProductVersion", "5.0.0.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/api/api_statistics.cpp b/Telegram/SourceFiles/api/api_statistics.cpp index 004836c8ec41d5..a642f940c9c043 100644 --- a/Telegram/SourceFiles/api/api_statistics.cpp +++ b/Telegram/SourceFiles/api/api_statistics.cpp @@ -760,14 +760,14 @@ rpl::producer EarnStatistics::request() { channel()->inputChannel )).done([=](const MTPstats_BroadcastRevenueStats &result) { const auto &data = result.data(); - + const auto &balances = data.vbalances().data(); _data = Data::EarnStatistics{ .topHoursGraph = StatisticalGraphFromTL( data.vtop_hours_graph()), .revenueGraph = StatisticalGraphFromTL(data.vrevenue_graph()), - .currentBalance = data.vcurrent_balance().v, - .availableBalance = data.vavailable_balance().v, - .overallRevenue = data.voverall_revenue().v, + .currentBalance = balances.vcurrent_balance().v, + .availableBalance = balances.vavailable_balance().v, + .overallRevenue = balances.voverall_revenue().v, .usdRate = data.vusd_rate().v, }; diff --git a/Telegram/SourceFiles/boxes/moderate_messages_box.cpp b/Telegram/SourceFiles/boxes/moderate_messages_box.cpp index e6079a0b72c83b..0e9ccab9e1cc44 100644 --- a/Telegram/SourceFiles/boxes/moderate_messages_box.cpp +++ b/Telegram/SourceFiles/boxes/moderate_messages_box.cpp @@ -46,12 +46,12 @@ For license and copyright information please follow this link: namespace { -using Users = std::vector>; +using Participants = std::vector>; struct ModerateOptions final { bool allCanBan = false; bool allCanDelete = false; - Users users; + Participants participants; }; ModerateOptions CalculateModerateOptions(const HistoryItemsList &items) { @@ -76,9 +76,9 @@ ModerateOptions CalculateModerateOptions(const HistoryItemsList &items) { if (!item->suggestDeleteAllReport()) { result.allCanDelete = false; } - if (const auto user = item->from()->asUser()) { - if (!ranges::contains(result.users, not_null{ user })) { - result.users.push_back(user); + if (const auto p = item->from()) { + if (!ranges::contains(result.participants, not_null{ p })) { + result.participants.push_back(p); } } } @@ -212,42 +212,45 @@ void CreateModerateMessagesBox( rpl::event_stream toggleRequestsFromTop; rpl::event_stream toggleRequestsFromInner; rpl::event_stream checkAllRequests; - Fn collectRequests; + Fn collectRequests; }; - const auto [allCanBan, allCanDelete, users] = CalculateModerateOptions( - items); + const auto [allCanBan, allCanDelete, participants] + = CalculateModerateOptions(items); const auto inner = box->verticalLayout(); - Assert(!users.empty()); + Assert(!participants.empty()); const auto confirms = inner->lifetime().make_state>(); - const auto isSingle = users.size() == 1; + const auto isSingle = participants.size() == 1; const auto buttonPadding = isSingle ? QMargins() - : QMargins(0, 0, Button::ComputeSize(users.size()).width(), 0); + : QMargins(0, 0, Button::ComputeSize(participants.size()).width(), 0); - using Request = Fn, not_null)>; - const auto sequentiallyRequest = [=](Request request, Users users) { + const auto session = &items.front()->history()->session(); + const auto historyPeerId = items.front()->history()->peer->id; + + using Request = Fn, not_null)>; + const auto sequentiallyRequest = [=]( + Request request, + Participants participants) { constexpr auto kSmallDelayMs = 5; - const auto session = &items.front()->history()->session(); - const auto history = items.front()->history(); - const auto peerId = history->peer->id; - const auto userIds = ranges::views::all( - users - ) | ranges::views::transform([](not_null user) { - return user->id; + const auto participantIds = ranges::views::all( + participants + ) | ranges::views::transform([](not_null peer) { + return peer->id; }) | ranges::to_vector; const auto lifetime = std::make_shared(); const auto counter = lifetime->make_state(0); const auto timer = lifetime->make_state(); timer->setCallback(crl::guard(session, [=] { - if ((*counter) < userIds.size()) { - const auto peer = session->data().peer(peerId); + if ((*counter) < participantIds.size()) { + const auto peer = session->data().peer(historyPeerId); const auto channel = peer ? peer->asChannel() : nullptr; - const auto from = session->data().peer(userIds[*counter]); - if (const auto user = from->asUser(); channel && user) { - request(user, channel); + const auto from = session->data().peer( + participantIds[*counter]); + if (channel && from) { + request(from, channel); } (*counter)++; } else { @@ -304,7 +307,8 @@ void CreateModerateMessagesBox( }); }; - const auto createUsersList = [&](not_null controller) { + const auto createParticipantsList = [&]( + not_null controller) { const auto wrap = inner->add( object_ptr>( inner, @@ -322,8 +326,8 @@ void CreateModerateMessagesBox( auto &lifetime = wrap->lifetime(); const auto clicks = lifetime.make_state>(); const auto checkboxes = ranges::views::all( - users - ) | ranges::views::transform([&](not_null user) { + participants + ) | ranges::views::transform([&](not_null peer) { const auto line = container->add( object_ptr(container)); const auto &st = st::moderateBoxUserpic; @@ -331,11 +335,11 @@ void CreateModerateMessagesBox( const auto userpic = Ui::CreateChild( line, - user, + peer, st); const auto checkbox = Ui::CreateChild( line, - user->name(), + peer->name(), false, st::defaultBoxCheckbox); line->widthValue( @@ -381,10 +385,10 @@ void CreateModerateMessagesBox( }, container->lifetime()); controller->collectRequests = [=] { - auto result = Users(); + auto result = Participants(); for (auto i = 0; i < checkboxes.size(); i++) { if (checkboxes[i]->checked()) { - result.push_back(users[i]); + result.push_back(participants[i]); } } return result; @@ -395,12 +399,13 @@ void CreateModerateMessagesBox( not_null checkbox, not_null controller) { if (isSingle) { - const auto user = users.front(); - controller->collectRequests = [=] { return Users{ user }; }; + const auto p = participants.front(); + controller->collectRequests = [=] { return Participants{ p }; }; return; } - const auto button = Ui::CreateChild