returning optionals for the optional god

closes sk22#555
This commit is contained in:
sk
2023-06-08 15:31:58 +02:00
parent 1ab953d819
commit 97547f334f
2 changed files with 40 additions and 39 deletions

View File

@@ -64,8 +64,8 @@ public class ExternalShareActivity extends FragmentStackActivity{
fediHandle
.<MastodonAPIRequest<?>>map(handle ->
UiUtils.lookupAccountHandle(this, accountId, handle, callback))
.or(() -> Optional.ofNullable(
UiUtils.lookupURL(this, accountId, text.get(), false, callback)))
.or(() ->
UiUtils.lookupURL(this, accountId, text.get(), false, callback))
.ifPresent(req ->
req.wrapProgress(this, R.string.loading, true, d -> {
UiUtils.transformDialogForLookup(this, accountId, isFediUrl ? text.get() : null, d);