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

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

No files matched your search

+9
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 {