Added clearing tree view before refreshing.

This commit is contained in:
ChronosX88 2019-01-28 19:01:03 +04:00
parent c63386bb12
commit 5bc86ce49a
No known key found for this signature in database
GPG Key ID: 8F92E090A87804AA
2 changed files with 4 additions and 0 deletions

View File

@ -128,6 +128,8 @@ public class MainActivity extends AppCompatActivity
mConnectionErrorImageView.setVisibility(View.INVISIBLE);
mErrorTextView.setVisibility(View.INVISIBLE);
mTreeViewContainer.setVisibility(View.VISIBLE);
rootNode.setChildren(new ArrayList<TreeNode>());
treeView.refreshTreeView();
mPresenter.getFirstLevel();
}

View File

@ -109,6 +109,8 @@ public class SearchableActivity extends AppCompatActivity implements MainContrac
mConnectionErrorImageView.setVisibility(View.INVISIBLE);
mErrorTextView.setVisibility(View.INVISIBLE);
mTreeViewContainer.setVisibility(View.VISIBLE);
rootNode.setChildren(new ArrayList<TreeNode>());
treeView.refreshTreeView();
searchablePresenter.fetchDetailsTreeByName(detailName);
}