projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added rectangle with first character
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
activity
/
FileDisplayActivity.java
diff --git
a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
index
48336d7
..
b820e13
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
@@
-164,6
+164,7
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
private static String DIALOG_UPLOAD_SOURCE = "DIALOG_UPLOAD_SOURCE";
private static String DIALOG_CERT_NOT_SAVED = "DIALOG_CERT_NOT_SAVED";
private static String DIALOG_UPLOAD_SOURCE = "DIALOG_UPLOAD_SOURCE";
private static String DIALOG_CERT_NOT_SAVED = "DIALOG_CERT_NOT_SAVED";
+ private NavigationDrawerListAdapter adapter = null;
private OCFile mWaitingToSend;
private OCFile mWaitingToSend;
@@
-237,7
+238,7
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
// ListView
ListView listView = (ListView) notificatonDrawer.findViewById(R.id.drawer_list);
// ListView
ListView listView = (ListView) notificatonDrawer.findViewById(R.id.drawer_list);
-
final NavigationDrawerListAdapter
adapter = new NavigationDrawerListAdapter(getApplicationContext(), this);
+ adapter = new NavigationDrawerListAdapter(getApplicationContext(), this);
listView.setAdapter(adapter);
listView.setAdapter(adapter);
@@
-276,8
+277,11
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
// Username
TextView username = (TextView) notificatonDrawer.findViewById(R.id.drawer_username);
Account account = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
// Username
TextView username = (TextView) notificatonDrawer.findViewById(R.id.drawer_username);
Account account = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
- int lastAtPos = account.name.lastIndexOf("@");
- username.setText(account.name.substring(0, lastAtPos));
+
+ if (account != null) {
+ int lastAtPos = account.name.lastIndexOf("@");
+ username.setText(account.name.substring(0, lastAtPos));
+ }
// Set the drawer toggle as the DrawerListener
mDrawerLayout.setDrawerListener(mDrawerToggle);
// Set the drawer toggle as the DrawerListener
mDrawerLayout.setDrawerListener(mDrawerToggle);
@@
-890,6
+894,9
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
Log_OC.v(TAG, "onResume() start");
super.onResume();
Log_OC.v(TAG, "onResume() start");
super.onResume();
+ // refresh Navigation Drawer account list
+ adapter.updateAccountList();
+
// refresh list of files
refreshListOfFilesFragment();
// refresh list of files
refreshListOfFilesFragment();