Android specific code in commonMain #23

Closed
opened 2022-07-24 08:59:01 +00:00 by AmineL · 0 comments
Owner

There's some Android specific code in commonMain, this has to be fixed as I guess it will introduce problems when porting it to iOS.
In particular, the problematic code is in

  • DateUtils
  • SelfossModel
    It comes from the imports, thus either a kotlin library should be found or a platform specific version should be written.
    The problem with SelfossModel should be easily solved, since its some simple html processing.

DateUtils appears to be a little bit more difficult for a common code solution. It is now using Java time libraries, I've found this kotlin library to handle dates, however it doesn't appear to have a way to generate relative dates. Which we are doing in those functions.

Deciding what to do about this will be important for the conclusion of #32 since the functions are now using one of the injection classes and I'll have to edit the code eventually.

There's some Android specific code in commonMain, this has to be fixed as I guess it will introduce problems when porting it to iOS. In particular, the problematic code is in - DateUtils - SelfossModel It comes from the imports, thus either a kotlin library should be found or a platform specific version should be written. The problem with SelfossModel should be easily solved, since its some simple html processing. DateUtils appears to be a little bit more difficult for a common code solution. It is now using Java time libraries, I've found [this](https://github.com/Kotlin/kotlinx-datetime) kotlin library to handle dates, however it doesn't appear to have a way to generate relative dates. Which we are doing in those functions. Deciding what to do about this will be important for the conclusion of #32 since the functions are now using one of the injection classes and I'll have to edit the code eventually.
AmineL referenced this issue from a commit 2022-08-23 18:39:13 +00:00
AmineL referenced this issue from a commit 2022-08-23 18:47:13 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Louvorg/ReaderForSelfoss-multiplatform#23
No description provided.