mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Prioritize last used playback timestamp.
This commit is contained in:
parent
e05bb75b8a
commit
247a070405
1 changed files with 5 additions and 1 deletions
|
@ -2789,12 +2789,16 @@ void SessionController::openDocument(
|
||||||
return;
|
return;
|
||||||
} else if (showInMediaView) {
|
} else if (showInMediaView) {
|
||||||
using namespace Media::View;
|
using namespace Media::View;
|
||||||
|
const auto saved = session().local().mediaLastPlaybackPosition(
|
||||||
|
document->id);
|
||||||
const auto timestamp = item ? ExtractVideoTimestamp(item) : 0;
|
const auto timestamp = item ? ExtractVideoTimestamp(item) : 0;
|
||||||
const auto usedTimestamp = videoTimestampOverride
|
const auto usedTimestamp = videoTimestampOverride
|
||||||
? ((*videoTimestampOverride) * crl::time(1000))
|
? ((*videoTimestampOverride) * crl::time(1000))
|
||||||
|
: saved
|
||||||
|
? saved
|
||||||
: timestamp
|
: timestamp
|
||||||
? (timestamp * crl::time(1000))
|
? (timestamp * crl::time(1000))
|
||||||
: session().local().mediaLastPlaybackPosition(document->id);
|
: crl::time();
|
||||||
_window->openInMediaView(OpenRequest(
|
_window->openInMediaView(OpenRequest(
|
||||||
this,
|
this,
|
||||||
document,
|
document,
|
||||||
|
|
Loading…
Add table
Reference in a new issue