Skip to content

Commit

Permalink
Use split ranges to export all messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jun 21, 2018
1 parent 36fb6da commit d056c00
Show file tree
Hide file tree
Showing 8 changed files with 232 additions and 98 deletions.
2 changes: 2 additions & 0 deletions Telegram/SourceFiles/export/data/export_data_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,8 @@ void FinalizeDialogsInfo(DialogsInfo &info, const Settings &settings) {
Unexpected("Type in ApiWrap::onlyMyMessages.");
}();
dialog.onlyMyMessages = ((settings.fullChats & setting) != setting);

ranges::reverse(dialog.splits);
}
}

Expand Down
6 changes: 4 additions & 2 deletions Telegram/SourceFiles/export/data/export_data_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,15 @@ struct DialogInfo {
TimeId topMessageDate = 0;
PeerId peerId = 0;

// User messages splits which contained that dialog.
std::vector<int> splits;

// Filled after the whole dialogs list is accumulated.
bool onlyMyMessages = false;
QString relativePath;

// Filled when requesting dialog messages.
int messagesCount = 0;

std::vector<int> messagesCountPerSplit;
};

struct DialogsInfo {
Expand Down
Loading

0 comments on commit d056c00

Please sign in to comment.