diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
index 320a91de8..340b6afa2 100644
--- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
+++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
@@ -256,9 +256,6 @@ protected void onCreate(Bundle savedInstanceState) {
checkNotificationPermissions();
- binding.toolbarLayout.avatar.setVisibility(View.VISIBLE);
- binding.toolbarLayout.avatar.setOnClickListener((v) -> startActivityForResult(new Intent(this, LoginDialogActivity.class), RESULT_LOGIN));
-
// Init config --> if nothing is configured start the login dialog.
if (!isUserLoggedIn()) {
startLoginActivity();
@@ -651,7 +648,8 @@ public void onUserInfoUpdated(OcsUser userInfo) {
String mOc_root_path = mPrefs.getString(SettingsActivity.EDT_OWNCLOUDROOTPATH_STRING, null);
String avatarUrl = mOc_root_path + "/index.php/avatar/" + Uri.encode(userInfo.getId()) + "/64";
- Glide.with(this)
+ // TODO: invalidate options menu and hack avatar and user name into the menu
+ /*Glide.with(this)
.load(avatarUrl)
.diskCacheStrategy(DiskCacheStrategy.DATA)
.placeholder(placeHolder)
@@ -661,7 +659,7 @@ public void onUserInfoUpdated(OcsUser userInfo) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
binding.toolbarLayout.avatar.setTooltipText(userInfo.getDisplayName());
- }
+ }*/
}
}
@@ -928,6 +926,9 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
} else if (itemId == R.id.menu_update) {
startSync();
}
+ else if (itemId == R.id.menu_account) {
+ startLoginActivity();
+ }
else if (itemId == R.id.menu_toggleShowOnlyUnread) {
boolean newValue = !mPrefs.getBoolean(SettingsActivity.CB_SHOWONLYUNREAD_STRING, false);
mPrefs.edit().putBoolean(SettingsActivity.CB_SHOWONLYUNREAD_STRING, newValue).commit();
diff --git a/News-Android-App/src/main/res/layout/toolbar_layout.xml b/News-Android-App/src/main/res/layout/toolbar_layout.xml
index 8f67d0b9a..3e5cb480f 100644
--- a/News-Android-App/src/main/res/layout/toolbar_layout.xml
+++ b/News-Android-App/src/main/res/layout/toolbar_layout.xml
@@ -1,36 +1,13 @@
-
+ android:layout_height="wrap_content"
+ android:minHeight="?attr/actionBarSize" />
-
-
-
-
-
-
-
-
\ No newline at end of file
+
diff --git a/News-Android-App/src/main/res/menu/news_reader.xml b/News-Android-App/src/main/res/menu/news_reader.xml
index dcda008d1..588509ceb 100644
--- a/News-Android-App/src/main/res/menu/news_reader.xml
+++ b/News-Android-App/src/main/res/menu/news_reader.xml
@@ -17,6 +17,13 @@
app:actionViewClass="android.widget.SearchView"
app:showAsAction="always|collapseActionView" />
+
+