lib/config, lib/model: Handle shared with information in config (fixes #4870) (#4974)

This commit is contained in:
Simon Frei
2018-06-06 23:34:11 +02:00
committed by GitHub
parent 53a029a796
commit e2c44f519c
3 changed files with 144 additions and 189 deletions

View File

@@ -261,6 +261,15 @@ func (f FolderConfiguration) RequiresRestartOnly() FolderConfiguration {
return copy
}
func (f *FolderConfiguration) SharedWith(device protocol.DeviceID) bool {
for _, dev := range f.Devices {
if dev.DeviceID == device {
return true
}
}
return false
}
type FolderDeviceConfigurationList []FolderDeviceConfiguration
func (l FolderDeviceConfigurationList) Less(a, b int) bool {