diff --git a/app/build.gradle b/app/build.gradle index eeb0fbc35..3b81e0b1d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,12 +58,15 @@ android { sourceSets { playstore { manifest.srcFile "src/main/AndroidManifest.xml" + java.srcDirs = ['src/main/java', 'src/playstore/java','src/common/java'] } fdroid { manifest.srcFile "src/main/AndroidManifest.xml" + java.srcDirs = ['src/main/java', 'src/fdroid/java','src/common/java'] } lite { manifest.srcFile "src/lite/AndroidManifest.xml" + java.srcDirs = ['src/main/java', 'src/lite/java'] } } @@ -147,7 +150,7 @@ dependencies { implementation 'com.github.duanhong169:colorpicker:1.1.6' implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.2.0' implementation 'com.github.stom79:Android-WYSIWYG-Editor:3.2.1' - + implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' implementation 'com.github.smarteist:autoimageslider:1.3.2' //debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2' @@ -157,7 +160,7 @@ dependencies { //Playstore playstoreImplementation "io.github.kobakei:ratethisapp:1.2.0" playstoreImplementation "org.conscrypt:conscrypt-android:2.4.0" - playstoreImplementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' + playstoreImplementation 'com.github.stom79:country-picker-android:1.2.0' playstoreImplementation 'com.vanniktech:emoji-one:0.6.0' playstoreImplementation 'ja.burhanrashid52:photoeditor:0.4.0' @@ -165,7 +168,6 @@ dependencies { //Fdroid fdroidImplementation "org.conscrypt:conscrypt-android:2.4.0" - fdroidImplementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' fdroidImplementation 'com.github.stom79:country-picker-android:1.2.0' fdroidImplementation 'com.vanniktech:emoji-one:0.6.0' fdroidImplementation 'ja.burhanrashid52:photoeditor:0.4.0' diff --git a/app/src/common/java/app/fedilab/android/drawers/StatusListAdapter.java b/app/src/common/java/app/fedilab/android/drawers/StatusListAdapter.java index a9bfb1156..c32b86bfe 100644 --- a/app/src/common/java/app/fedilab/android/drawers/StatusListAdapter.java +++ b/app/src/common/java/app/fedilab/android/drawers/StatusListAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.drawer; +package app.fedilab.android.drawers; /* Copyright 2020 Thomas Schneider * * This file is a part of Fedilab @@ -13,19 +13,21 @@ package app.fedilab.android.drawer; * * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ +import android.content.Intent; import android.os.AsyncTask; +import android.os.Bundle; import android.view.inputmethod.InputMethodManager; import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.EmojiPopup; import com.vanniktech.emoji.one.EmojiOneProvider; +import app.fedilab.android.activities.OwnerNotificationChartsActivity; import app.fedilab.android.asynctasks.PostActionAsyncTask; import app.fedilab.android.asynctasks.RetrieveFeedsAsyncTask; import app.fedilab.android.client.API; import app.fedilab.android.client.Entities.Reaction; import app.fedilab.android.client.Entities.StatusDrawerParams; -import app.fedilab.android.drawers.BaseStatusListAdapter; import static android.content.Context.INPUT_METHOD_SERVICE; @@ -74,4 +76,12 @@ public class StatusListAdapter extends BaseStatusListAdapter { emojiPopup.toggle(); } + protected void notificationCharts(){ + Intent intent = new Intent(context, OwnerNotificationChartsActivity.class); + Bundle b = new Bundle(); + b.putString("status_id", status.getReblog() != null ? status.getReblog().getId() : status.getId()); + intent.putExtras(b); + context.startActivity(intent); + } + } diff --git a/app/src/fdroid/java/app/fedilab/android/activities/BaseActivity.java b/app/src/fdroid/java/app/fedilab/android/activities/BaseActivity.java index 1a6d4fb56..f73443a17 100644 --- a/app/src/fdroid/java/app/fedilab/android/activities/BaseActivity.java +++ b/app/src/fdroid/java/app/fedilab/android/activities/BaseActivity.java @@ -1,8 +1,12 @@ package app.fedilab.android.activities; +import android.annotation.SuppressLint; + import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.one.EmojiOneProvider; +import app.fedilab.android.helper.Helper; + /** * Created by Thomas on 12/12/2017. diff --git a/app/src/lite/AndroidManifest.xml b/app/src/lite/AndroidManifest.xml index 2860222d5..5f15ba0d3 100644 --- a/app/src/lite/AndroidManifest.xml +++ b/app/src/lite/AndroidManifest.xml @@ -329,10 +329,6 @@ android:configChanges="keyboardHidden|orientation|screenSize" android:label="@string/app_name" android:theme="@style/AppThemeDark_NoActionBar" /> - @@ -376,25 +372,7 @@ android:label="@string/app_name" android:theme="@style/AppThemeDark_NoActionBar" android:windowSoftInputMode="stateAlwaysHidden" /> - - - - + . */ import android.annotation.SuppressLint; diff --git a/app/src/lite/java/app/fedilab/android/drawers/StatusListAdapter.java b/app/src/lite/java/app/fedilab/android/drawers/StatusListAdapter.java index 58a0ce846..9fcc003fe 100644 --- a/app/src/lite/java/app/fedilab/android/drawers/StatusListAdapter.java +++ b/app/src/lite/java/app/fedilab/android/drawers/StatusListAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.drawer; +package app.fedilab.android.drawers; /* Copyright 2020 Thomas Schneider * * This file is a part of Fedilab @@ -13,17 +13,11 @@ package app.fedilab.android.drawer; * * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import android.os.AsyncTask; -import android.view.inputmethod.InputMethodManager; -import app.fedilab.android.asynctasks.PostActionAsyncTask; -import app.fedilab.android.asynctasks.RetrieveFeedsAsyncTask; -import app.fedilab.android.client.API; -import app.fedilab.android.client.Entities.Reaction; +import android.app.Activity; +import android.view.WindowManager; + import app.fedilab.android.client.Entities.StatusDrawerParams; -import app.fedilab.android.drawers.BaseStatusListAdapter; - -import static android.content.Context.INPUT_METHOD_SERVICE; public class StatusListAdapter extends BaseStatusListAdapter { public StatusListAdapter(StatusDrawerParams statusDrawerParams) { @@ -31,7 +25,10 @@ public class StatusListAdapter extends BaseStatusListAdapter { } protected void statusAddReactionClick(){ - + ((Activity)context).getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); } + protected void notificationCharts(){ + + } } diff --git a/app/src/main/java/app/fedilab/android/drawers/BaseStatusListAdapter.java b/app/src/main/java/app/fedilab/android/drawers/BaseStatusListAdapter.java index ee73cde5c..a2617207d 100644 --- a/app/src/main/java/app/fedilab/android/drawers/BaseStatusListAdapter.java +++ b/app/src/main/java/app/fedilab/android/drawers/BaseStatusListAdapter.java @@ -94,9 +94,6 @@ import com.github.stom79.mytransl.client.HttpsConnectionException; import com.github.stom79.mytransl.client.Results; import com.github.stom79.mytransl.translate.Translate; import com.google.android.material.floatingactionbutton.FloatingActionButton; -import com.vanniktech.emoji.EmojiManager; -import com.vanniktech.emoji.EmojiPopup; -import com.vanniktech.emoji.one.EmojiOneProvider; import com.varunest.sparkbutton.SparkButton; import org.jetbrains.annotations.NotNull; @@ -119,7 +116,6 @@ import app.fedilab.android.activities.BaseActivity; import app.fedilab.android.activities.BaseMainActivity; import app.fedilab.android.activities.CustomSharingActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.activities.OwnerNotificationChartsActivity; import app.fedilab.android.activities.PeertubeActivity; import app.fedilab.android.activities.ShowAccountActivity; import app.fedilab.android.activities.ShowConversationActivity; @@ -146,7 +142,6 @@ import app.fedilab.android.client.Entities.ManageTimelines; import app.fedilab.android.client.Entities.Notification; import app.fedilab.android.client.Entities.Poll; import app.fedilab.android.client.Entities.PollOptions; -import app.fedilab.android.client.Entities.Reaction; import app.fedilab.android.client.Entities.Relationship; import app.fedilab.android.client.Entities.Status; import app.fedilab.android.client.Entities.StatusDrawerParams; @@ -197,7 +192,7 @@ import static app.fedilab.android.helper.Helper.makeEmojis; * Created by Thomas on 24/04/2017. * Adapter for Status */ -public class StatusListAdapter extends RecyclerView.Adapter implements OnPostActionInterface, OnRetrieveFeedsInterface, OnRetrieveImageInterface, OnRetrieveEmojiInterface, OnRetrieveRepliesInterface, OnRetrieveCardInterface, OnPollInterface, OnRefreshCachedStatusInterface, OnRetrieveSearcAccountshInterface, OnRetrieveSearchInterface, OnPostStatusActionInterface, OnRetrieveRelationshipQuickReplyInterface, OnSyncBookmarksInterface { +public abstract class BaseStatusListAdapter extends RecyclerView.Adapter implements OnPostActionInterface, OnRetrieveFeedsInterface, OnRetrieveImageInterface, OnRetrieveEmojiInterface, OnRetrieveRepliesInterface, OnRetrieveCardInterface, OnPollInterface, OnRefreshCachedStatusInterface, OnRetrieveSearcAccountshInterface, OnRetrieveSearchInterface, OnPostStatusActionInterface, OnRetrieveRelationshipQuickReplyInterface, OnSyncBookmarksInterface { public static final int DISPLAYED_STATUS = 1; public static final int COMPACT_STATUS = 3; @@ -206,11 +201,13 @@ public class StatusListAdapter extends RecyclerView.Adapter statuses; private boolean isOnWifi; - private StatusListAdapter statusListAdapter; - private RetrieveFeedsAsyncTask.Type type; + private BaseStatusListAdapter statusListAdapter; + protected RetrieveFeedsAsyncTask.Type type; private String targetedId; private int conversationPosition; private boolean redraft; @@ -248,9 +245,9 @@ public class StatusListAdapter extends RecyclerView.Adapter new ManagePollAsyncTask(context, ManagePollAsyncTask.type_s.REFRESH, status, null, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR)); + holder.refresh_poll.setOnClickListener(v -> new ManagePollAsyncTask(context, ManagePollAsyncTask.type_s.REFRESH, status, null, BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR)); holder.poll_container.setVisibility(View.VISIBLE); holder.number_votes.setText(context.getResources().getQuantityString(R.plurals.number_of_voters, poll.getVoters_count(), poll.getVoters_count())); if (poll.isExpired()) { @@ -877,7 +874,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { String comment = input.getText().toString(); if (comment.trim().length() > 0) { - new PostActionAsyncTask(context, PeertubeActivity.video_id, comment, status.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new PostActionAsyncTask(context, PeertubeActivity.video_id, comment, status.getId(), BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); dialog.dismiss(); } }); @@ -902,7 +899,7 @@ public class StatusListAdapter extends RecyclerView.Adapter dialog.dismiss()); builderInner.setPositiveButton(R.string.yes, (dialog, which) -> { - new PostActionAsyncTask(context, API.StatusAction.PEERTUBEDELETECOMMENT, PeertubeActivity.video_id, null, status.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new PostActionAsyncTask(context, API.StatusAction.PEERTUBEDELETECOMMENT, PeertubeActivity.video_id, null, status.getId(), BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); dialog.dismiss(); }); builderInner.show(); @@ -1016,111 +1013,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { - EmojiManager.install(new EmojiOneProvider()); - final EmojiPopup emojiPopup = EmojiPopup.Builder.fromRootView(holder.status_add_reaction).setOnEmojiPopupDismissListener(() -> { - InputMethodManager imm = (InputMethodManager) context.getSystemService(INPUT_METHOD_SERVICE); - assert imm != null; - imm.hideSoftInputFromWindow(holder.status_add_reaction.getWindowToken(), 0); - }).setOnEmojiClickListener((emoji, imageView) -> { - String emojiStr = imageView.getUnicode(); - boolean alreadyAdded = false; - for (Reaction reaction : status.getReactions()) { - if (reaction.getName().compareTo(emojiStr) == 0) { - alreadyAdded = true; - reaction.setCount(reaction.getCount() - 1); - if (reaction.getCount() == 0) { - status.getReactions().remove(reaction); - } - notifyStatusChanged(status); - break; - } - } - if (!alreadyAdded) { - Reaction reaction = new Reaction(); - reaction.setMe(true); - reaction.setCount(1); - reaction.setName(emojiStr); - status.getReactions().add(0, reaction); - notifyStatusChanged(status); - } - API.StatusAction statusAction; - if (type == RetrieveFeedsAsyncTask.Type.ANNOUNCEMENTS) { - statusAction = alreadyAdded ? API.StatusAction.REMOVE_REACTION : API.StatusAction.ADD_REACTION; - } else { - statusAction = alreadyAdded ? API.StatusAction.REMOVE_PLEROMA_REACTION : API.StatusAction.ADD_PLEROMA_REACTION; - } - new PostActionAsyncTask(context, statusAction, status.getId(), null, emojiStr, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - }) - .build(holder.fake_edittext); - emojiPopup.toggle(); - }); - if (social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) { - holder.status_add_custom_emoji.setVisibility(View.GONE); - } - holder.status_add_custom_emoji.setOnClickListener(v -> { - SQLiteDatabase db = Sqlite.getInstance(context.getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open(); - String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, null); - Account account = new AccountDAO(context, db).getUniqAccount(userId, instance); - List emojis = new CustomEmojiDAO(context, db).getAllEmojis(account.getInstance()); - if (theme == Helper.THEME_DARK) { - style = R.style.DialogDark; - } else if (theme == Helper.THEME_BLACK) { - style = R.style.DialogBlack; - } else { - style = R.style.Dialog; - } - final AlertDialog.Builder builder = new AlertDialog.Builder(context, style); - int paddingPixel = 15; - float density = context.getResources().getDisplayMetrics().density; - int paddingDp = (int) (paddingPixel * density); - builder.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss()); - builder.setTitle(R.string.insert_emoji); - if (emojis != null && emojis.size() > 0) { - GridView gridView = new GridView(context); - gridView.setAdapter(new CustomEmojiAdapter(emojis)); - gridView.setNumColumns(5); - gridView.setOnItemClickListener((parent, view, position, id) -> { - boolean alreadyAdded = false; - for (Reaction reaction : status.getReactions()) { - if (reaction.getName().compareTo(emojis.get(position).getShortcode()) == 0) { - alreadyAdded = true; - reaction.setCount(reaction.getCount() - 1); - if (reaction.getCount() == 0) { - status.getReactions().remove(reaction); - } - notifyStatusChanged(status); - break; - } - } - if (!alreadyAdded) { - Reaction reaction = new Reaction(); - reaction.setMe(true); - reaction.setCount(1); - reaction.setName(emojis.get(position).getShortcode()); - reaction.setUrl(emojis.get(position).getUrl()); - status.getReactions().add(0, reaction); - notifyStatusChanged(status); - } - API.StatusAction statusAction; - if (type == RetrieveFeedsAsyncTask.Type.ANNOUNCEMENTS) { - statusAction = alreadyAdded ? API.StatusAction.REMOVE_REACTION : API.StatusAction.ADD_REACTION; - } else { - statusAction = alreadyAdded ? API.StatusAction.REMOVE_PLEROMA_REACTION : API.StatusAction.ADD_PLEROMA_REACTION; - } - new PostActionAsyncTask(context, statusAction, status.getId(), null, emojis.get(position).getShortcode(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - alertDialogEmoji.dismiss(); - }); - gridView.setPadding(paddingDp, paddingDp, paddingDp, paddingDp); - builder.setView(gridView); - } else { - TextView textView = new TextView(context); - textView.setText(context.getString(R.string.no_emoji)); - textView.setPadding(paddingDp, paddingDp, paddingDp, paddingDp); - builder.setView(textView); - } - alertDialogEmoji = builder.show(); - }); + holder.status_add_reaction.setOnClickListener(v -> statusAddReactionClick()); } holder.status_cardview_title.setTextColor(ContextCompat.getColor(context, R.color.dark_text_toot_header)); @@ -1175,7 +1068,7 @@ public class StatusListAdapter extends RecyclerView.Adapter new ManageCachedStatusAsyncTask(context, status.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR)); + holder.cached_status.setOnClickListener(v -> new ManageCachedStatusAsyncTask(context, status.getId(), BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR)); } if (holder.fedilab_features != null && !fedilab_features_button) @@ -1266,11 +1159,11 @@ public class StatusListAdapter extends RecyclerView.Adapter { if (type != RetrieveFeedsAsyncTask.Type.CACHE_BOOKMARKS) { - new ManageCachedStatusAsyncTask(context, status.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new ManageCachedStatusAsyncTask(context, status.getId(), BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); status.setCustomFeaturesDisplayed(false); notifyStatusChanged(status); } else { - new SyncBookmarksAsyncTask(context, status.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new SyncBookmarksAsyncTask(context, status.getId(), BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } }); @@ -2167,7 +2060,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { android.widget.PopupMenu popup = new android.widget.PopupMenu(context, holder.quick_reply_button); popup.getMenuInflater() @@ -2330,7 +2223,7 @@ public class StatusListAdapter extends RecyclerView.Adapter= android.os.Build.VERSION_CODES.LOLLIPOP) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ActivityOptionsCompat options = ActivityOptionsCompat .makeSceneTransitionAnimation((Activity) context, holder.webview_preview, attachment.getUrl()); // start the new activity @@ -2363,7 +2256,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { - if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED || (quick_reply && type != RetrieveFeedsAsyncTask.Type.REMOTE_INSTANCE && type != RetrieveFeedsAsyncTask.Type.NEWS)) { + if (social == UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED || (quick_reply && type != RetrieveFeedsAsyncTask.Type.REMOTE_INSTANCE && type != RetrieveFeedsAsyncTask.Type.NEWS)) { if (social == UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED) { holder.quick_reply_switch_to_full.setVisibility(View.GONE); @@ -2377,7 +2270,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { if (!status.isFavourited() && confirmFav) @@ -2557,7 +2450,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { @@ -2567,7 +2460,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { if (!status.isReblogged() && confirmBoost) @@ -2576,9 +2469,9 @@ public class StatusListAdapter extends RecyclerView.Adapter CrossActions.doCrossAction(context, type, status, null, (status.isPinned() || (status.getReblog() != null && status.getReblog().isPinned())) ? API.StatusAction.UNPIN : API.StatusAction.PIN, statusListAdapter, StatusListAdapter.this, true)); + holder.status_pin.setOnClickListener(v -> CrossActions.doCrossAction(context, type, status, null, (status.isPinned() || (status.getReblog() != null && status.getReblog().isPinned())) ? API.StatusAction.UNPIN : API.StatusAction.PIN, statusListAdapter, BaseStatusListAdapter.this, true)); int style; if (theme == Helper.THEME_DARK) { style = R.style.DialogDark; @@ -2610,7 +2503,7 @@ public class StatusListAdapter extends RecyclerView.Adapter dialog.dismiss()); builderInner.setPositiveButton(R.string.yes, (dialog, which) -> { String targetedId = status.getId(); - new PostActionAsyncTask(context, doAction, targetedId, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new PostActionAsyncTask(context, doAction, targetedId, BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); if (redraft) { if (status.getIn_reply_to_id() != null && !status.getIn_reply_to_id().trim().equals("null")) { toot = new Status(); @@ -2621,7 +2514,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { - CrossActions.doCrossAction(context, type, status, null, API.StatusAction.FAVOURITE, statusListAdapter, StatusListAdapter.this, false); + CrossActions.doCrossAction(context, type, status, null, API.StatusAction.FAVOURITE, statusListAdapter, BaseStatusListAdapter.this, false); return true; }); if (!status.getVisibility().equals("direct")) holder.spark_button_reblog.setOnLongClickListener(view -> { - CrossActions.doCrossAction(context, type, status, null, API.StatusAction.REBLOG, statusListAdapter, StatusListAdapter.this, false); + CrossActions.doCrossAction(context, type, status, null, API.StatusAction.REBLOG, statusListAdapter, BaseStatusListAdapter.this, false); return true; }); @@ -2715,7 +2608,7 @@ public class StatusListAdapter extends RecyclerView.Adapter { if (doAction == API.StatusAction.UNSTATUS) { String targetedId = status.getId(); - new PostActionAsyncTask(context, doAction, targetedId, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new PostActionAsyncTask(context, doAction, targetedId, BaseStatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); if (redraft) { if (status.getIn_reply_to_id() != null && !status.getIn_reply_to_id().trim().equals("null")) { toot = new Status(); @@ -2993,7 +2882,7 @@ public class StatusListAdapter extends RecyclerView.Adapter 0) { Application application = status.getApplication(); holder.status_toot_app.setText(application.getName()); @@ -3128,6 +3017,8 @@ public class StatusListAdapter extends RecyclerView.Adapter accounts = connectedAccounts(context, status, false); API.StatusAction doAction; //Only bookmark the initial status