mirror of https://github.com/procxx/kepka.git
Some export bugs fixed.
This commit is contained in:
parent
2dc3ec955a
commit
e8d619c740
|
@ -461,7 +461,7 @@ void ApiWrap::appendDialogsSlice(Data::DialogsInfo &&info) {
|
||||||
Expects(_dialogsProcess != nullptr);
|
Expects(_dialogsProcess != nullptr);
|
||||||
Expects(_settings != nullptr);
|
Expects(_settings != nullptr);
|
||||||
|
|
||||||
const auto types = _settings->types | _settings->fullChats;
|
const auto types = _settings->types;
|
||||||
auto filtered = ranges::view::all(
|
auto filtered = ranges::view::all(
|
||||||
info.list
|
info.list
|
||||||
) | ranges::view::filter([&](const Data::DialogInfo &info) {
|
) | ranges::view::filter([&](const Data::DialogInfo &info) {
|
||||||
|
@ -519,7 +519,7 @@ void ApiWrap::requestNextDialog() {
|
||||||
Expects(_dialogsProcess->single == nullptr);
|
Expects(_dialogsProcess->single == nullptr);
|
||||||
|
|
||||||
const auto index = ++_dialogsProcess->singleIndex;
|
const auto index = ++_dialogsProcess->singleIndex;
|
||||||
if (index < 11) {// _dialogsProcess->info.list.size()) {
|
if (index < _dialogsProcess->info.list.size()) {
|
||||||
const auto &one = _dialogsProcess->info.list[index];
|
const auto &one = _dialogsProcess->info.list[index];
|
||||||
_dialogsProcess->single = std::make_unique<DialogsProcess::Single>(one);
|
_dialogsProcess->single = std::make_unique<DialogsProcess::Single>(one);
|
||||||
_dialogsProcess->startOne(one);
|
_dialogsProcess->startOne(one);
|
||||||
|
@ -631,7 +631,8 @@ void ApiWrap::loadNextMessageFile() {
|
||||||
}
|
}
|
||||||
const auto ready = processFileLoad(
|
const auto ready = processFileLoad(
|
||||||
list[index].file(),
|
list[index].file(),
|
||||||
[=](const QString &path) { loadMessageFileDone(path); });
|
[=](const QString &path) { loadMessageFileDone(path); },
|
||||||
|
&list[index]);
|
||||||
if (!ready) {
|
if (!ready) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,8 @@ void SerializeMultiline(
|
||||||
offset = newline + 1;
|
offset = newline + 1;
|
||||||
newline = value.indexOf('\n', offset);
|
newline = value.indexOf('\n', offset);
|
||||||
} while (newline > 0);
|
} while (newline > 0);
|
||||||
|
appendTo.append("> ");
|
||||||
|
appendTo.append(data + offset).append(kLineBreak);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray JoinList(
|
QByteArray JoinList(
|
||||||
|
@ -181,15 +183,17 @@ QByteArray SerializeMessage(
|
||||||
using SkipReason = Data::File::SkipReason;
|
using SkipReason = Data::File::SkipReason;
|
||||||
const auto pushPath = [&](
|
const auto pushPath = [&](
|
||||||
const Data::File &file,
|
const Data::File &file,
|
||||||
const QByteArray &label) {
|
const QByteArray &label,
|
||||||
|
const QByteArray &name = QByteArray()) {
|
||||||
Expects(!file.relativePath.isEmpty()
|
Expects(!file.relativePath.isEmpty()
|
||||||
|| file.skipReason != SkipReason::None);
|
|| file.skipReason != SkipReason::None);
|
||||||
|
|
||||||
push(label, [&]() -> QByteArray {
|
push(label, [&]() -> QByteArray {
|
||||||
|
const auto pre = name.isEmpty() ? QByteArray() : name + ' ';
|
||||||
switch (file.skipReason) {
|
switch (file.skipReason) {
|
||||||
case SkipReason::Unavailable: return "(file unavailable)";
|
case SkipReason::Unavailable: return pre + "(file unavailable)";
|
||||||
case SkipReason::FileSize: return "(file too large)";
|
case SkipReason::FileSize: return pre + "(file too large)";
|
||||||
case SkipReason::FileType: return "(file skipped)";
|
case SkipReason::FileType: return pre + "(file skipped)";
|
||||||
case SkipReason::None: return FormatFilePath(file);
|
case SkipReason::None: return FormatFilePath(file);
|
||||||
}
|
}
|
||||||
Unexpected("Skip reason while writing file path.");
|
Unexpected("Skip reason while writing file path.");
|
||||||
|
|
Loading…
Reference in New Issue