-
Notifications
You must be signed in to change notification settings - Fork 2
/
Loadmore.puml
47 lines (40 loc) · 1000 Bytes
/
Loadmore.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@startuml
'https://plantuml.com/class-diagram
interface LoadMoreDataFetcher{
+ fetch()
}
interface UiReceiver{
+ reload()
+ loadMore()
+ retry()
+ onItemAccess()
}
enum LoadMoreStatus{
Idle
NoMore
Fail
Loading
}
class LoadMoreDataSource{
+ UiReceiver uiReceiver
+ Flow<DataChangeEvent<T>> dataFlow
+ StateFlow<LoadMoreStatus> statusFlow
}
LoadMoreDataSource::uiReceiver *-- "包含" UiReceiver
LoadMoreDataSource::statusFlow *-- "包含" LoadMoreStatus
class ViewModel.LoadMoreData{
- LoadMoreDataFetcher fetcher
+ LoadMoreDataSource source
+ int fetchDistance
+ reload()
+ loadMore()
+ retry()
}
ViewModel.LoadMoreData::source *-- "包含" LoadMoreDataSource
ViewModel.LoadMoreData::fetcher *-- "包含" LoadMoreDataFetcher
class View.LoadMoreAdapterModule{
- LoadMoreDataSource attachedData
+ setDataSource()
}
View.LoadMoreAdapterModule::setDataSource "数据来源" <-- ViewModel.LoadMoreData::source
@enduml