Merge branch 'master' of https://github.com/owncloud/android into material_buttons
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / FileDisplayActivity.java
index 27d55c7..89d22c6 100644 (file)
@@ -271,12 +271,7 @@ public class FileDisplayActivity extends HookActivity
             setFile(file);
 
             if (mAccountWasSet) {
-                RelativeLayout navigationDrawerLayout = (RelativeLayout) findViewById(R.id.left_drawer);
-                if (navigationDrawerLayout != null && getAccount() != null) {
-                    TextView username = (TextView) navigationDrawerLayout.findViewById(R.id.drawer_username);
-                    int lastAtPos = getAccount().name.lastIndexOf("@");
-                    username.setText(getAccount().name.substring(0, lastAtPos));
-                }
+                setUsernameInDrawer((RelativeLayout) findViewById(R.id.left_drawer), getAccount());
             }
 
             if (!stateWasRecovered) {
@@ -1236,20 +1231,6 @@ public class FileDisplayActivity extends HookActivity
         setFile(file);
     }
 
-    /**
-     * Shows the share view for sharing  {@link OCFile} received as a
-     * parameter in the second fragment.
-     *
-     * @param file {@link OCFile}  File to share with
-     */
-    @Override
-    public void showShareFile(OCFile file) {
-        Intent intent = new Intent(this, ShareActivity.class);
-        intent.putExtra(EXTRA_FILE, file);
-        intent.putExtra(EXTRA_ACCOUNT, getAccount());
-        startActivity(intent);
-    }
-
     @Override
     protected void updateActionBarTitleAndHomeButton(OCFile chosenFile) {
         if (mDualPane) {