all: Add receive only folder type (#5027)
Adds a receive only folder type that does not send changes, and where the user can optionally revert local changes. Also changes some of the icons to make the three folder types distinguishable.
This commit is contained in:
@@ -11,6 +11,7 @@ type FolderType int
|
||||
const (
|
||||
FolderTypeSendReceive FolderType = iota // default is sendreceive
|
||||
FolderTypeSendOnly
|
||||
FolderTypeReceiveOnly
|
||||
)
|
||||
|
||||
func (t FolderType) String() string {
|
||||
@@ -19,6 +20,8 @@ func (t FolderType) String() string {
|
||||
return "sendreceive"
|
||||
case FolderTypeSendOnly:
|
||||
return "sendonly"
|
||||
case FolderTypeReceiveOnly:
|
||||
return "receiveonly"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
@@ -34,6 +37,8 @@ func (t *FolderType) UnmarshalText(bs []byte) error {
|
||||
*t = FolderTypeSendReceive
|
||||
case "readonly", "sendonly":
|
||||
*t = FolderTypeSendOnly
|
||||
case "receiveonly":
|
||||
*t = FolderTypeReceiveOnly
|
||||
default:
|
||||
*t = FolderTypeSendReceive
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user