Commit graph

3 commits

Author SHA1 Message Date
Tor Lillqvist
4b7ecde829 When opening an attachment from the Mail app make sure it is opened read-only
Luckily the UISceneOpenURLOptions has a property openInPlace that
seems to be good to use for this. If openInPlace is false, that means
we should open the document read-only.

This is a stopgap fix to avoid the situation where the user does
changes to a document that is an attachment in an email message. Those
changes won't be saved anywhere they could be found later. Better to
keep the document read-only.

The ideal solution would be to ask the user right away where they want
an editable copy of the document to be stored. Later.

Signed-off-by: Tor Lillqvist <tml@iki.fi>
Change-Id: Ifd7d824d4f73cbf458f8597cd0974cf171b35be7
2022-04-12 19:10:20 +03:00
Tor Lillqvist
6d37e4c004 Fix pointer type warning
Signed-off-by: Tor Lillqvist <tml@iki.fi>
Change-Id: I07da296f8ef1533dae0f379a39984609ecce2a76
2022-04-12 19:10:20 +03:00
Tor Lillqvist
46fff02d15 Make it possible again to open documents in this app from other apps like Mail
We keep open documents in the view controller stack. If you already
have one document loaded into this app, and then in Mail select an
attachment or in Files select a document to be opened in this app, it
will be loaded so that when you close it, you will be back editing the
earlier document.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I921907a2cbf8220a45b6dc0f304ba7eaec0befbc
2022-04-12 19:10:20 +03:00