SendViewController
This is the compose screen.
external states
input states
if the sendView is called you may set the attributes
-
prefilledMail
the contents of this mail will be set in the sendView -
invite
(default:false
) states, if the composed mail will be a invite mail. We will show the invite button (in the menu of the iconButton [navigationBar]) in the sendView if this value isfalse
and a postcard is composed. -
sendViewDelegate
important for reaction to output states -
enforcePostcard
(default:false
) iftrue
: even if there are only recipients with known keys present send a postcard to everybody. This value may be changed by user while editing the composition
output states
have a look at the SendViewDelegate
, if you want to interact with these states.
the state after composing is one of the following:
- composition is discarded
- composition is saved as draft
- composition is sent
internal states
recipientSecurityState
Recipients colored in blue symbolize we have a key for them. Recipients colored in orange symbolize we have no key for them.
-
none
there are no recipients in the current composition -
allSecure
we have a key for every recipient of the current composition -
allInsecure
for none of the recipients we have a key -
mixed
we have a key for some recipients, but not for all
mailSecurityState
Describes the security state of the composition itself.
-
letter
send an encrypted and signed mail to every recipient -
postcard
A postcard symbolizes an unencrypted and unsigned mail. IfenforcePostcard
isfalse
(default) a letter is send to every recipient we have a key for instead of a postcard. Otherwise every recipient will get a postcard. -
extendedPostcard
same as postcard, but with extra features:-
censored
every recipient, who gets a postcard, will get a censored postcard. This means the user may mark some parts of the body text to be only readable for letter recipients and visibly unreadable for postcard recipients.
-
-
partiallyEncrypted
same as censored, but the marked parts are readable for postcard recipients on a website with a password. The sender is guided to transfer the password over a second channel
sendInProgress
-
true
the client tries to send a mail at the moment. In this case we don't want the user to manipulate content or tap again on send -
false
(default) the user has the ability to interact with the most parts of the UI
important functions
-
newInput(_ tokenField: VENTokenField)
called, if new recipients are finally added -
AddressHandler.frequentAddresses(_ inserted: [String]) -> [(UIImage, String, String, UIImage?, UIColor)]
called to get content and order for fast suggestion in the collectionViews under the recipient fields