diff options
author | Andrew Dolgov <[email protected]> | 2015-06-02 08:55:00 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-06-02 08:55:00 +0300 |
commit | a8280107e4230f20f406bb63429456a84c9b83f4 (patch) | |
tree | c37919dd8ea3d182ecb53043b8c4b065e3f34f19 /org.fox.ttrss/src/main/java | |
parent | ff8c1ad1dc3018dedbc681d4f94ce4284424fa67 (diff) |
open ttrss url when clicking on a account icon
Diffstat (limited to 'org.fox.ttrss/src/main/java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java index 717375e2..67a06d74 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java @@ -6,8 +6,10 @@ import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; +import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; +import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.Fragment; @@ -241,6 +243,21 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe server.setText(""); } + View account = view.findViewById(R.id.drawer_header_account); + + account.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW, + Uri.parse(m_prefs.getString("ttrss_url", ""))); + startActivity(intent); + } catch (Exception e) { + + } + } + }); + } catch (InflateException e) { // welp couldn't inflate header i guess e.printStackTrace(); |