Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: isLoading: set true earlier, and false later #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fdietze
Copy link
Member

@fdietze fdietze commented Nov 2, 2019

No description provided.

isLoading() = false
}
case Failure(_) =>
//TODO: send empty graph event?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when getNewGraph fails, I think we should clear the graph here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//TODO: send empty graph event?
eventProcessor.localEvents.onNext(ReplaceGraph(Graph.empty)).foreach { _ =>
isLoading() = false
}

}
case Failure(_) =>
//TODO: send empty graph event?
isLoading() = false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
isLoading() = false

@cornerman
Copy link
Member

cornerman commented Nov 2, 2019

I think, this generally is probably "more correct", but also a bit error-prone because you have to reset isLoading in multiple places at the end. It is a bit difficult to read on the github web ui.

Best thing would probably issuing a new-increasing sequence number for each request. then let rawgraph return the sequence number it belongs to. Then isLoading just becomes requestSeqNumber() != rawGraph().requestSeqNumber.

@fdietze fdietze added the todo label Nov 19, 2019
Copy link
Member

@cornerman cornerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants