ForNeVeR/Fenrir

Cancel previous commit requests if selected ref changes

開放

#36 建立於 2020年5月13日

 (1 則留言) (0 個反應) (0 位負責人)F# (2 個分叉)auto 404
bughelp wanted

倉庫指標

星標
 (34 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

See this TODO comment: https://github.com/ForNeVeR/Fenrir/blob/f091f85b8b09cb1813cfbeb8bcbdf2870e46ad36/Fenrir/Ui/CommitsViewModel.fs#L36-L49

Consider this scenario:

  1. User selects a ref named ref1
  2. This code block starts asynchronous load of commits for ref1
  3. User quickly changes their selection to a ref named ref2
  4. This code block starts another asynchronous load
  5. Load for ref2 my finish earlier than for ref1, so data for ref2 will be loaded into the commit control
  6. And later, when the asynchronous load task for ref1 is finished, it will override the contents of the commit control, which is bad!

貢獻者指南