lib/config: Rewrite pending notifications (fixes #2291)
This commit is contained in:
committed by
GitHub
parent
03c0537340
commit
aec66045ef
@@ -268,20 +268,6 @@ func (f *FolderConfiguration) SharedWith(device protocol.DeviceID) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type FolderDeviceConfigurationList []FolderDeviceConfiguration
|
||||
|
||||
func (l FolderDeviceConfigurationList) Less(a, b int) bool {
|
||||
return l[a].DeviceID.Compare(l[b].DeviceID) == -1
|
||||
}
|
||||
|
||||
func (l FolderDeviceConfigurationList) Swap(a, b int) {
|
||||
l[a], l[b] = l[b], l[a]
|
||||
}
|
||||
|
||||
func (l FolderDeviceConfigurationList) Len() int {
|
||||
return len(l)
|
||||
}
|
||||
|
||||
func (f *FolderConfiguration) CheckAvailableSpace(req int64) error {
|
||||
fs := f.Filesystem()
|
||||
usage, err := fs.Usage(".")
|
||||
@@ -296,17 +282,3 @@ func (f *FolderConfiguration) CheckAvailableSpace(req int64) error {
|
||||
}
|
||||
return fmt.Errorf("insufficient space in %v %v", fs.Type(), fs.URI())
|
||||
}
|
||||
|
||||
type FolderConfigurationList []FolderConfiguration
|
||||
|
||||
func (l FolderConfigurationList) Len() int {
|
||||
return len(l)
|
||||
}
|
||||
|
||||
func (l FolderConfigurationList) Less(a, b int) bool {
|
||||
return l[a].ID < l[b].ID
|
||||
}
|
||||
|
||||
func (l FolderConfigurationList) Swap(a, b int) {
|
||||
l[a], l[b] = l[b], l[a]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user