aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2019-11-14 20:31:42 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2019-11-15 17:14:08 +0100
commitf42f00b40eaa0ba9ed03592deea2651cab8ed4a0 (patch)
treed89f166d4facb74e057ffdb33f268b1c44c83249 /src/main/java/de/pixart/messenger
parent6a8fb3e8aed08df03198b5909964fb91a5e78f39 (diff)
rework IntroActivity a bit
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/IntroActivity.java8
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/WelcomeActivity.java3
3 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/IntroActivity.java b/src/main/java/de/pixart/messenger/ui/IntroActivity.java
index d368c3274..da2b29e14 100644
--- a/src/main/java/de/pixart/messenger/ui/IntroActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/IntroActivity.java
@@ -18,6 +18,8 @@ public class IntroActivity extends AppIntro {
public static final String ACTIVITY = "activity";
public static final String MULTICHAT = "multi_chat";
public static final String START_UI = "StartUI";
+ public static final String WELCOME_ACTIVITY = "WelcomeActivity";
+ public static final String START_CONVERSATION_ACTIVITY = "StartConversationActivity";
public static final String CONVERSATIONS_ACTIVITY = "ConversationsActivity";
public static final String CONTACT_DETAILS_ACTIVITY = "ContactDetailsActivity";
public static final String CONFERENCE_DETAILS_ACTIVITY = "ConferenceDetailsActivity";
@@ -90,7 +92,8 @@ public class IntroActivity extends AppIntro {
permissions3.setImageDrawable(R.drawable.intro_location_icon);
permissions3.setBgColor(backgroundColor);
addSlide(AppIntroFragment.newInstance(permissions3));
-
+ break;
+ case WELCOME_ACTIVITY:
SliderPage account = new SliderPage();
account.setTitle(getString(R.string.intro_account));
account.setDescription(getString(R.string.intro_desc_account));
@@ -111,7 +114,8 @@ public class IntroActivity extends AppIntro {
account3.setImageDrawable(R.drawable.intro_account_icon);
account3.setBgColor(backgroundColor);
addSlide(AppIntroFragment.newInstance(account3));
-
+ break;
+ case START_CONVERSATION_ACTIVITY:
SliderPage startChatting = new SliderPage();
startChatting.setTitle(getString(R.string.intro_start_chatting));
startChatting.setDescription(getString(R.string.intro_desc_start_chatting));
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index 574995e36..4cfd752b6 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -71,6 +71,7 @@ import de.pixart.messenger.services.XmppConnectionService;
import de.pixart.messenger.services.XmppConnectionService.OnRosterUpdate;
import de.pixart.messenger.ui.adapter.ListItemAdapter;
import de.pixart.messenger.ui.interfaces.OnBackendConnected;
+import de.pixart.messenger.ui.util.IntroHelper;
import de.pixart.messenger.ui.util.JidDialog;
import de.pixart.messenger.ui.util.PendingItem;
import de.pixart.messenger.ui.util.SoftKeyboardUtils;
@@ -273,10 +274,10 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
});
mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
binding.startConversationViewPager.setAdapter(mListPagerAdapter);
-
mConferenceAdapter = new ListItemAdapter(this, conferences);
mContactsAdapter = new ListItemAdapter(this, contacts);
mContactsAdapter.setOnTagClickedListener(this.mOnTagClickedListener);
+ IntroHelper.showIntro(this, false);
final SharedPreferences preferences = getPreferences();
this.mHideOfflineContacts = QuickConversationsService.isConversations() && preferences.getBoolean("hide_offline", false);
diff --git a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
index a46b24a5a..d0257e44b 100644
--- a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
@@ -12,6 +12,7 @@ import android.widget.TextView;
import android.widget.Toast;
import de.pixart.messenger.R;
+import de.pixart.messenger.ui.util.IntroHelper;
import static de.pixart.messenger.Config.DISALLOW_REGISTRATION_IN_UI;
import static de.pixart.messenger.utils.PermissionUtils.allGranted;
@@ -60,7 +61,7 @@ public class WelcomeActivity extends XmppActivity {
ab.setDisplayShowHomeEnabled(false);
ab.setDisplayHomeAsUpEnabled(false);
}
-
+ IntroHelper.showIntro(this, false);
final Button ImportDatabase = findViewById(R.id.import_database);
final TextView ImportText = findViewById(R.id.import_text);
if (hasStoragePermission(REQUEST_IMPORT_BACKUP)) {