Skip to content

Conversation

@fdietze
Copy link
Member

@fdietze fdietze commented Nov 2, 2019

No description provided.

@fdietze fdietze requested a review from cornerman November 2, 2019 11:51
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.

3 participants