mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix album part edit/delete/replace after reorder.
This commit is contained in:
@@ -760,6 +760,8 @@ void SendFilesBox::pushBlock(int from, int till) {
|
||||
) | rpl::filter([=] {
|
||||
return !_removingIndex;
|
||||
}) | rpl::start_with_next([=](int index) {
|
||||
applyBlockChanges();
|
||||
|
||||
_removingIndex = index;
|
||||
crl::on_main(this, [=] {
|
||||
const auto index = base::take(_removingIndex).value_or(-1);
|
||||
@@ -780,6 +782,8 @@ void SendFilesBox::pushBlock(int from, int till) {
|
||||
const auto show = uiShow();
|
||||
block.itemReplaceRequest(
|
||||
) | rpl::start_with_next([=](int index) {
|
||||
applyBlockChanges();
|
||||
|
||||
const auto replace = [=](Ui::PreparedList list) {
|
||||
if (list.files.empty()) {
|
||||
return;
|
||||
@@ -855,6 +859,8 @@ void SendFilesBox::pushBlock(int from, int till) {
|
||||
const auto openedOnce = widget->lifetime().make_state<bool>(false);
|
||||
block.itemModifyRequest(
|
||||
) | rpl::start_with_next([=, show = _show](int index) {
|
||||
applyBlockChanges();
|
||||
|
||||
if (!(*openedOnce)) {
|
||||
show->session().settings().incrementPhotoEditorHintShown();
|
||||
show->session().saveSettings();
|
||||
|
Reference in New Issue
Block a user