-
Notifications
You must be signed in to change notification settings - Fork 28
bug: 'Add Task' button in relation screen is enabled for an empty relation too #128
Comments
@yugantarjain Can I work on this issue? I got a working solution already |
Hi @gsnsg, thanks a lot for your interest in working on this issue! I've kept this as a good first time issue due to its simplicity. I do have another issue in mind about improving the Relation Screen UI when the user is not in a mentorship relation (like the screenshot above). As you can see, as of now the app shows default "Mentee" and "Jan 1, 1970". We can hide them, and also have a message on the screen saying something like "You're not in a mentorship relation, you can find members and send a request from members page." and have a button that redirects the user to the members tab. |
@yugantarjain Can I work on this issue? |
Hi sure. Assigned! |
…#128 I have used `@ViewBuilder` attribute to pass the appropriate `View` to the `navigationBarItems(trailing:)` method. Before collecting data from the server the `id` of `currentRelation` is 0 and if the user doesn't have any Relation then the server response for `id` would be nil. This is why I have checked both of the conditions.
Hide `Add Task` button if current relation is empty to fix #128
Describe the bug
The 'Add Task' button in the relation screen stays enabled even when the user is not in a mentorship relation. A task can only be added when a relation exists, hence this button shall be disabled in case the relation is nil.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The 'Add Task' button should be disabled when the user is not in a relation
Screenshots
Add Task button is enabled
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: