Skip to content

Commit

Permalink
Auto-generate Lemmy-API types. (#657)
Browse files Browse the repository at this point in the history
* Adding a copy generated types from lemmy-js-client script.

* Initial types commit.

* Changing types to immutable.

* Refactoring to use auto-generated types from ts-rs.

- Also added ApiState to represent 4 API states:
  - Empty, Loading, Fail, and Success
- Still needs testing

* Some more additions.

* Fixing login.

* Resolving a few more issues.

* Using alternate suggestedTitle.

* Compiling, but not fixed.

* Fixing lints.

* Most things working except for subscribe.

* Fixing follow.

* Cleaning up progress indicators.

* Removing unecessary padding.

* Fixing tests.

* Fix crash when marking comment as read (#711)

* Adding word breaks to regex.

* Fix issue of an empty screen in inbox (#715)

The issue was caused by the activity checking for a completed request in
the PostViewModel. However, since this activity was triggered by the
inbox, that request was never made.

The only data it needed was whether the user was a moderator, so I pass
that information in with the deep link. In all cases we had enough
information in the navigating activity to determine this, with the
exception of the inbox, but we don't mark moderators in the inbox (at
least lemmy-ui doesn't).

This is a little bit of a hack, but it's a relatively clean hack.

* Fix invalid navigation route.

* Fix wrong updates on comment edits.

---------

Co-authored-by: Jameson Little <[email protected]>
  • Loading branch information
dessalines and beatgammit authored Jun 19, 2023
1 parent 16ea94b commit 7d9c5a6
Show file tree
Hide file tree
Showing 326 changed files with 6,412 additions and 5,954 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ insert_final_newline = true
end_of_line = lf

ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_comment-wrapping = disabled
3 changes: 3 additions & 0 deletions RESOURCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Compose resources

- [Modify MutableState class properties](https://stackoverflow.com/questions/63956058/jetpack-compose-state-modify-class-property)
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.6'
kotlinCompilerExtensionVersion '1.4.7'
}
}

Expand Down
190 changes: 95 additions & 95 deletions app/src/main/java/com/jerboa/MainActivity.kt

Large diffs are not rendered by default.

Loading

0 comments on commit 7d9c5a6

Please sign in to comment.