mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +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;
|
||||
} else if (showInMediaView) {
|
||||
using namespace Media::View;
|
||||
const auto saved = session().local().mediaLastPlaybackPosition(
|
||||
document->id);
|
||||
const auto timestamp = item ? ExtractVideoTimestamp(item) : 0;
|
||||
const auto usedTimestamp = videoTimestampOverride
|
||||
? ((*videoTimestampOverride) * crl::time(1000))
|
||||
: saved
|
||||
? saved
|
||||
: timestamp
|
||||
? (timestamp * crl::time(1000))
|
||||
: session().local().mediaLastPlaybackPosition(document->id);
|
||||
: crl::time();
|
||||
_window->openInMediaView(OpenRequest(
|
||||
this,
|
||||
document,
|
||||
|
|
Loading…
Add table
Reference in a new issue