Index bad audio files to Shared Files Overview.

Fixes #4120.
This commit is contained in:
John Preston 2017-12-08 19:50:35 +04:00
parent a868c7bc8b
commit 951db83ab6
1 changed files with 6 additions and 13 deletions

View File

@ -1590,10 +1590,8 @@ int32 HistoryDocument::addToOverview(AddToOverviewMethod method) {
if (_data->voice()) { if (_data->voice()) {
result |= addToOneOverview(OverviewVoiceFiles, method); result |= addToOneOverview(OverviewVoiceFiles, method);
result |= addToOneOverview(OverviewRoundVoiceFiles, method); result |= addToOneOverview(OverviewRoundVoiceFiles, method);
} else if (_data->song()) { } else if (_data->isMusic()) {
if (_data->isMusic()) { result |= addToOneOverview(OverviewMusicFiles, method);
result |= addToOneOverview(OverviewMusicFiles, method);
}
} else { } else {
result |= addToOneOverview(OverviewFiles, method); result |= addToOneOverview(OverviewFiles, method);
} }
@ -1604,10 +1602,8 @@ void HistoryDocument::eraseFromOverview() {
if (_data->voice()) { if (_data->voice()) {
eraseFromOneOverview(OverviewVoiceFiles); eraseFromOneOverview(OverviewVoiceFiles);
eraseFromOneOverview(OverviewRoundVoiceFiles); eraseFromOneOverview(OverviewRoundVoiceFiles);
} else if (_data->song()) { } else if (_data->isMusic()) {
if (_data->isMusic()) { eraseFromOneOverview(OverviewMusicFiles);
eraseFromOneOverview(OverviewMusicFiles);
}
} else { } else {
eraseFromOneOverview(OverviewFiles); eraseFromOneOverview(OverviewFiles);
} }
@ -1619,11 +1615,8 @@ Storage::SharedMediaTypesMask HistoryDocument::sharedMediaTypes() const {
return Storage::SharedMediaTypesMask{} return Storage::SharedMediaTypesMask{}
.added(Type::VoiceFile) .added(Type::VoiceFile)
.added(Type::RoundVoiceFile); .added(Type::RoundVoiceFile);
} else if (_data->song()) { } else if (_data->isMusic()) {
if (_data->isMusic()) { return Type::MusicFile;
return Type::MusicFile;
}
return {};
} }
return Type::File; return Type::File;
} }