Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a7df31

Browse files
committed
[MainView] Only Provide Initial Data Source Once
1 parent1f74c80 commit7a7df31

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎SwiftFlowGitHubBrowser/ViewControllers/MainViewController.swift‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ class MainViewController: UIViewController, StoreSubscriber {
3535
}
3636

3737
store.dispatch(fetchGitHubRepositories)
38-
self.dataSource=ArrayDataSource(array:[], cellType:RepositoryTableViewCell.self)
38+
39+
ifself.dataSource==nil{
40+
// If we have no intial data, let's configure it.
41+
self.dataSource=ArrayDataSource(array:[], cellType:RepositoryTableViewCell.self)
42+
}
43+
3944
tableView.dataSource= dataSource
4045
tableView.delegate=self
4146
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp