From 3bc82b309562868b72ddb42d006e6cb4d8d3a2a2 Mon Sep 17 00:00:00 2001 From: Sam Steele Date: Mon, 27 Mar 2017 10:15:16 -0400 Subject: [PATCH] Remove FLAG_ACTIVITY_NEW_TASK when choosing a channel to share a file to --- .idea/misc.xml | 2 +- src/com/irccloud/android/activity/ShareChooserActivity.java | 3 --- src/com/irccloud/android/fragment/MessageViewFragment.java | 2 +- src/com/irccloud/android/fragment/WhoWasFragment.java | 5 ++++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 1caa1363c..95f0f0310 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/src/com/irccloud/android/activity/ShareChooserActivity.java b/src/com/irccloud/android/activity/ShareChooserActivity.java index 0f7c6d889..6c3e5aafe 100644 --- a/src/com/irccloud/android/activity/ShareChooserActivity.java +++ b/src/com/irccloud/android/activity/ShareChooserActivity.java @@ -280,9 +280,6 @@ public void run() { @Override public void onBufferSelected(int bid) { Intent i = new Intent(this, MainActivity.class); - i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) - i.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); i.putExtra("bid", bid); if (getIntent() != null && getIntent().getData() != null) i.setData(getIntent().getData()); diff --git a/src/com/irccloud/android/fragment/MessageViewFragment.java b/src/com/irccloud/android/fragment/MessageViewFragment.java index 39c48ce47..46fe6d625 100644 --- a/src/com/irccloud/android/fragment/MessageViewFragment.java +++ b/src/com/irccloud/android/fragment/MessageViewFragment.java @@ -556,7 +556,7 @@ public void insertAbove(long eid, Event e) { public void insertBelow(long eid, Event e) { synchronized (data) { - if(data.get(data.size() - 1).eid == eid) { + if(data.size() == 0 || data.get(data.size() - 1).eid == eid) { data.add(e); return; } diff --git a/src/com/irccloud/android/fragment/WhoWasFragment.java b/src/com/irccloud/android/fragment/WhoWasFragment.java index 7a6c15fff..733a97ad4 100644 --- a/src/com/irccloud/android/fragment/WhoWasFragment.java +++ b/src/com/irccloud/android/fragment/WhoWasFragment.java @@ -90,7 +90,10 @@ public void onBindViewHolder(ViewHolder holder, final int position) { row.usermask.setVisibility(View.GONE); } row.setRealname(node.get("realname").asText()); - row.setLastconnected(node.get("last_seen").asText()); + if(node.get("last_seen") != null) + row.setLastconnected(node.get("last_seen").asText()); + else + row.setLastconnected(""); row.setConnectedvia(node.get("ircserver").asText()); if(node.has("connecting_from")) { row.setInfo(node.get("connecting_from").asText());