forked from quickshell/quickshell
		
	service/mpris: fix display position when paused
This commit is contained in:
		
							parent
							
								
									f89c504b55
								
							
						
					
					
						commit
						e223408143
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -217,6 +217,7 @@ void MprisPlayer::setPosition(qreal position) {
 | 
				
			||||||
void MprisPlayer::onPositionChanged() {
 | 
					void MprisPlayer::onPositionChanged() {
 | 
				
			||||||
	const bool firstChange = !this->lastPositionTimestamp.isValid();
 | 
						const bool firstChange = !this->lastPositionTimestamp.isValid();
 | 
				
			||||||
	this->lastPositionTimestamp = QDateTime::currentDateTimeUtc();
 | 
						this->lastPositionTimestamp = QDateTime::currentDateTimeUtc();
 | 
				
			||||||
 | 
						this->pausedTime = this->lastPositionTimestamp;
 | 
				
			||||||
	emit this->positionChanged();
 | 
						emit this->positionChanged();
 | 
				
			||||||
	if (firstChange) emit this->positionSupportedChanged();
 | 
						if (firstChange) emit this->positionSupportedChanged();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue