Describe the solution you'd like
When I click on a relationship with another Deck board, I would like to have it open to that board within Deck.
Currently the links just open in the mobile browser and not within Deck.
Describe alternatives you've considered
I can just open the linked project in the mobile web browser.
Yes, we have to face the same problem like on push notifications: It is possible that the card has not yet been synced to the app yet. Therefore we have to look into the database, sync if possible and then return the card.
@desperateCoder i need some regex magic to parse the boardRemoteId and cardRemoteId from
/index.php/apps/deck/#/board/45/card/34
and the boardRemoteId from
/index.php/apps/deck/#/board/45
please add two static methods to CardProjectResourceViewHolder which both expect a @NonNull String url
Done [in master]. works a little bit different than you wanted (you got only one method for both), but it is much more performant like this.
I documented it as well, i guess you gonna be happy with it, once you try it. It even provides a little bit of error tolerance as well (stuff as trailing /s and stuff).
Hope it works out
Nice, i added some unit tests in ProjectUtilTest.java and set them to @Ignore because some of them still fail. Would you mind having a look at the different scenarios?
done.
Opening cards within the app has been implemented and will be shipped with 1.10.0. I will keep the app open for opening boards within the app.
Opening the board within the app needs some more work: We need an startActivityForResult when opening a card with an appropriate return code, because we need to end the EditActivity to be finished to return to the MainActivity. A drawback of this solution is that if one opens a card from another activity (like push notifications), this will not work.
Another idea is to parametrize the MainActivity and start it directly from the EditActivity. 馃 This might cause some weird status, though...
Most helpful comment
Yes, we have to face the same problem like on push notifications: It is possible that the card has not yet been synced to the app yet. Therefore we have to look into the database, sync if possible and then return the card.