mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
clipboard: dont take ownership on nil offers
This commit is contained in:
@@ -229,18 +229,6 @@ func (m *Manager) setupDataDeviceSync() {
|
|||||||
m.ownerLock.Unlock()
|
m.ownerLock.Unlock()
|
||||||
|
|
||||||
if offer == nil {
|
if offer == nil {
|
||||||
if wasOwner {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.persistMutex.RLock()
|
|
||||||
hasData := len(m.persistData) > 0
|
|
||||||
m.persistMutex.RUnlock()
|
|
||||||
if hasData {
|
|
||||||
log.Debug("Selection cleared, re-taking ownership")
|
|
||||||
m.post(func() {
|
|
||||||
m.takePersistOwnership()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user