Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable jetpack app features #15946

Merged
merged 32 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d430673
Remove Jetpack filtering for sites
ashiagr Feb 9, 2022
a0f67dc
Enable add new site menu for Jetpack app
ashiagr Feb 9, 2022
7ccd749
Restrict adding self-hosted site in Jetpack app using add new site op…
ashiagr Feb 9, 2022
85f767f
Update login lib version
ashiagr Feb 9, 2022
200208f
Enable add site menu using build config constant
ashiagr Feb 10, 2022
861ad82
Enable new login epilogue with create new site button using build con…
ashiagr Feb 10, 2022
4519984
Restrict adding self-hosted site in Jetpack app using build config co…
ashiagr Feb 10, 2022
324f3a0
Add build constant to enable signup in Jetpack app
ashiagr Feb 10, 2022
c7b5e42
Enable signup using build config constant
ashiagr Feb 10, 2022
4b7206f
Enable reader using build config constant
ashiagr Feb 10, 2022
2cf853e
Enable create (page/post/story) FAB using build config constant
ashiagr Feb 10, 2022
59613d3
Enable quick action using build config constant
ashiagr Feb 10, 2022
575e55e
Enable followed sites settings using build config constant
ashiagr Feb 10, 2022
aec0761
Enable feature announcement using build config constant
ashiagr Feb 10, 2022
45748da
Enable App Settings -> What's New using build config constant
ashiagr Feb 10, 2022
1e19bf6
Enable shortcut for new post
ashiagr Feb 10, 2022
08c3a64
Merge pull request #15920 from wordpress-mobile/issue/15916-enable-al…
ashiagr Feb 11, 2022
9100652
Merge pull request #15928 from wordpress-mobile/issue/15922-allow-acc…
ashiagr Feb 11, 2022
c160deb
Merge pull request #15930 from wordpress-mobile/issue/15929-enable-mo…
ashiagr Feb 11, 2022
695a729
Merge branch 'issue/15494-fix-no-sites-flow-after-login' into feature…
ashiagr Feb 14, 2022
88c27f4
Don't show no jetpack sites for jetpack app when site creation is ena…
ashiagr Feb 14, 2022
92b851e
Show post signup interstitial screen for Jetpack app when signup is e…
ashiagr Feb 14, 2022
950749c
Replace app name on signup interstitial screen
ashiagr Feb 14, 2022
f4fb003
Merge branch 'trunk' into feature/15915-enable-jetpack-app-features
ashiagr Feb 14, 2022
b63ce2d
Add release notes
ashiagr Feb 14, 2022
dbb8ab8
Merge branch 'trunk' into feature/15915-enable-jetpack-app-features
ashiagr Feb 14, 2022
1f76982
Hide My Site empty view illustration with WordPress app icon in Jetpa…
ashiagr Feb 15, 2022
ef7b711
Fix ktlint issue
ashiagr Feb 15, 2022
f2b93e4
Add illustration for post signup interstitial screen
ashiagr Feb 17, 2022
df5022c
Refactor: Use post signup interstitial screen img wrapping appropriat…
ashiagr Feb 18, 2022
f552f2e
Build: Update login lib hash
ashiagr Feb 18, 2022
1d0949d
Merge branch 'trunk' into feature/15915-enable-jetpack-app-features
ashiagr Feb 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [*] Site creation: Fixed bug where sites created within the app were not given the correct time zone, leading to post scheduling issues. [https://github.com/wordpress-mobile/WordPress-Android/pull/15904]
* [*] Login Epilogue: Fixed bug where if no sites available, then new login epilogue screen without clickable sites and with "create new site" is shown instead of no sites empty "My Site" view. [https://github.com/wordpress-mobile/WordPress-Android/pull/15944]
* [*] Fixes flickering when changing the preview mode in Page or Site design picker [https://github.com/wordpress-mobile/WordPress-Android/pull/15943]
* [**] Jetpack App: Signup using WordPress.com, create your favorite site and enjoy the Reader inside Jetpack app. [https://github.com/wordpress-mobile/WordPress-Android/pull/15946]
* [*] Reader: Admins and Editors can edit comments from Reader [https://github.com/wordpress-mobile/WordPress-Android/pull/15957]
* [*] Improves the error message shown when trying to create a new site with non-English characters in the domain name [https://github.com/wordpress-mobile/WordPress-Android/pull/15969]

Expand Down
18 changes: 18 additions & 0 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ android {
buildConfigField "boolean", "COMMENTS_SNIPPET", "false"
buildConfigField "boolean", "READER_COMMENTS_MODERATION", "false"

// Override these constants in jetpack product flavor to enable/ disable features
buildConfigField "boolean", "ENABLE_SITE_CREATION", "true"
buildConfigField "boolean", "ENABLE_ADD_SELF_HOSTED_SITE", "true"
buildConfigField "boolean", "ENABLE_SIGNUP", "true"
buildConfigField "boolean", "ENABLE_READER", "true"
buildConfigField "boolean", "ENABLE_CREATE_FAB", "true"
buildConfigField "boolean", "ENABLE_QUICK_ACTION", "true"
buildConfigField "boolean", "ENABLE_FOLLOWED_SITES_SETTINGS", "true"
buildConfigField "boolean", "ENABLE_WHATS_NEW_FEATURE", "true"

manifestPlaceholders = [magicLinkScheme:"wordpress"]
}

Expand Down Expand Up @@ -151,6 +161,14 @@ android {

applicationId "com.jetpack.android"
buildConfigField "boolean", "IS_JETPACK_APP", "true"
buildConfigField "boolean", "ENABLE_SITE_CREATION", "true"
buildConfigField "boolean", "ENABLE_ADD_SELF_HOSTED_SITE", "false"
buildConfigField "boolean", "ENABLE_SIGNUP", "true"
buildConfigField "boolean", "ENABLE_READER", "true"
buildConfigField "boolean", "ENABLE_CREATE_FAB", "true"
buildConfigField "boolean", "ENABLE_QUICK_ACTION", "true"
buildConfigField "boolean", "ENABLE_FOLLOWED_SITES_SETTINGS", "true"
buildConfigField "boolean", "ENABLE_WHATS_NEW_FEATURE", "true"
buildConfigField "String", "TRACKS_EVENT_PREFIX", '"jpandroid_"'
buildConfigField "String", "PUSH_NOTIFICATIONS_APP_KEY", '"com.jetpack.android"'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Flow
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Step.PROLOGUE
import org.wordpress.android.ui.accounts.login.LoginPrologueViewModel.ButtonUiState.ContinueWithWpcomButtonState
import org.wordpress.android.ui.accounts.login.LoginPrologueViewModel.ButtonUiState.EnterYourSiteAddressButtonState
import org.wordpress.android.util.BuildConfigWrapper
import org.wordpress.android.util.analytics.AnalyticsTrackerWrapper
import org.wordpress.android.viewmodel.Event
import org.wordpress.android.viewmodel.ScopedViewModel
Expand All @@ -26,6 +27,7 @@ import javax.inject.Named
class LoginPrologueViewModel @Inject constructor(
private val unifiedLoginTracker: UnifiedLoginTracker,
private val analyticsTrackerWrapper: AnalyticsTrackerWrapper,
private val buildConfigWrapper: BuildConfigWrapper,
@Named(UI_THREAD) mainDispatcher: CoroutineDispatcher
) : ScopedViewModel(mainDispatcher) {
private val _navigationEvents = MediatorLiveData<Event<LoginNavigationEvents>>()
Expand All @@ -44,7 +46,14 @@ class LoginPrologueViewModel @Inject constructor(

_uiState.value = UiState(
enterYourSiteAddressButtonState = EnterYourSiteAddressButtonState(::onEnterYourSiteAddressButtonClick),
continueWithWpcomButtonState = ContinueWithWpcomButtonState(::onContinueWithWpcomButtonClick)
continueWithWpcomButtonState = ContinueWithWpcomButtonState(
title = if (buildConfigWrapper.isSignupEnabled) {
R.string.continue_with_wpcom
} else {
R.string.continue_with_wpcom_no_signup
},
onClick = ::onContinueWithWpcomButtonClick
)
)
}

Expand All @@ -71,9 +80,10 @@ class LoginPrologueViewModel @Inject constructor(
abstract val title: Int
abstract val onClick: (() -> Unit)

data class ContinueWithWpcomButtonState(override val onClick: () -> Unit) : ButtonUiState() {
override val title = R.string.continue_with_wpcom_no_signup
}
data class ContinueWithWpcomButtonState(
override val title: Int,
override val onClick: () -> Unit
) : ButtonUiState()

data class EnterYourSiteAddressButtonState(override val onClick: () -> Unit) : ButtonUiState() {
override val title = R.string.enter_your_site_address
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_jetpack_empty_state"/>
</layer-list>
3 changes: 3 additions & 0 deletions WordPress/src/jetpack/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<!-- About View -->
<string name="app_title">Jetpack for Android</string>

<!-- Post-Signup Interstitial -->
<string name="post_signup_interstitial_title">Welcome to Jetpack</string>

<!-- Login Prologue -->
<string name="app_tagline">Site security and performance from your pocket</string>
<string name="continue_with_wpcom_no_signup">Log in with WordPress.com</string>
Expand Down
2 changes: 1 addition & 1 deletion WordPress/src/jetpack/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:icon="@drawable/ic_shortcut_create_post"
android:shortcutId="new_post"
android:shortcutShortLabel="@string/new_post"
android:enabled="false">
android:enabled="true">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.wordpress.android.ui.main.WPMainActivity"
Expand Down
2 changes: 1 addition & 1 deletion WordPress/src/jetpackJalapeno/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:icon="@drawable/ic_shortcut_create_post"
android:shortcutId="new_post"
android:shortcutShortLabel="@string/new_post"
android:enabled="false">
android:enabled="true">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.wordpress.android.ui.main.WPMainActivity"
Expand Down
2 changes: 1 addition & 1 deletion WordPress/src/jetpackWasabi/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:icon="@drawable/ic_shortcut_create_post"
android:shortcutId="new_post"
android:shortcutShortLabel="@string/new_post"
android:enabled="false">
android:enabled="true">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.wordpress.android.ui.main.WPMainActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1379,12 +1379,12 @@ public static void showLoginEpilogue(
Activity activity,
boolean doLoginUpdate,
ArrayList<Integer> oldSitesIds,
boolean isJetpackApp
boolean isSiteCreationEnabled
) {
Intent intent = new Intent(activity, LoginEpilogueActivity.class);
intent.putExtra(LoginEpilogueActivity.EXTRA_DO_LOGIN_UPDATE, doLoginUpdate);
intent.putIntegerArrayListExtra(LoginEpilogueActivity.ARG_OLD_SITES_IDS, oldSitesIds);
if (!isJetpackApp) {
if (isSiteCreationEnabled) {
activity.startActivityForResult(intent, RequestCodes.LOGIN_EPILOGUE);
} else {
activity.startActivity(intent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import org.wordpress.android.ui.reader.services.update.ReaderUpdateServiceStarter;
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
import org.wordpress.android.util.BuildConfigWrapper;
import org.wordpress.android.util.SelfSignedSSLUtils;
import org.wordpress.android.util.StringUtils;
import org.wordpress.android.util.ToastUtils;
Expand Down Expand Up @@ -132,6 +133,7 @@ private enum SmartLockHelperState {
@Inject UnifiedLoginTracker mUnifiedLoginTracker;
@Inject protected SiteStore mSiteStore;
@Inject protected ViewModelProvider.Factory mViewModelFactory;
@Inject BuildConfigWrapper mBuildConfigWrapper;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -158,7 +160,7 @@ protected void onCreate(Bundle savedInstanceState) {
break;
case JETPACK_LOGIN_ONLY:
mUnifiedLoginTracker.setSource(Source.DEFAULT);
mIsSignupFromLoginEnabled = false;
mIsSignupFromLoginEnabled = mBuildConfigWrapper.isSignupEnabled();
loginFromPrologue();
break;
case WPCOM_LOGIN_ONLY:
Expand Down Expand Up @@ -305,10 +307,19 @@ public LoginMode getLoginMode() {
private void loggedInAndFinish(ArrayList<Integer> oldSitesIds, boolean doLoginUpdate) {
switch (getLoginMode()) {
case JETPACK_LOGIN_ONLY:
if (!mSiteStore.hasSite()) {
if (!mSiteStore.hasSite() && !mBuildConfigWrapper.isSiteCreationEnabled()) {
handleNoJetpackSites();
} else {
ActivityLauncher.showMainActivityAndLoginEpilogue(this, oldSitesIds, doLoginUpdate);
if (!mSiteStore.hasSite()
&& AppPrefs.shouldShowPostSignupInterstitial()
&& !doLoginUpdate
&& mBuildConfigWrapper.isSiteCreationEnabled()
&& mBuildConfigWrapper.isSignupEnabled()
) {
ActivityLauncher.showPostSignupInterstitial(this);
} else {
ActivityLauncher.showMainActivityAndLoginEpilogue(this, oldSitesIds, doLoginUpdate);
}
setResult(Activity.RESULT_OK);
finish();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ class LoginEpilogueViewModel @Inject constructor(
}

private fun handleNoSitesFound() {
if (buildConfigWrapper.isJetpackApp) {
if (buildConfigWrapper.isJetpackApp && !buildConfigWrapper.isSiteCreationEnabled) {
_navigationEvents.postValue(Event(LoginNavigationEvents.ShowNoJetpackSites))
} else {
if (appPrefsWrapper.shouldShowPostSignupInterstitial) {
if (appPrefsWrapper.shouldShowPostSignupInterstitial && buildConfigWrapper.isSignupEnabled) {
_navigationEvents.postValue(Event(LoginNavigationEvents.ShowPostSignupInterstitialScreen))
}
_navigationEvents.postValue(Event(LoginNavigationEvents.CloseWithResultOk))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ && getResources().getConfiguration().orientation == Configuration.ORIENTATION_PO
}

private boolean isNewLoginEpilogueScreenEnabled() {
return !mBuildConfigWrapper.isJetpackApp()
return mBuildConfigWrapper.isSiteCreationEnabled()
&& !mShowAndReturn;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import org.wordpress.android.util.AccessibilityUtils;
import org.wordpress.android.util.ActivityUtils;
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.BuildConfigWrapper;
import org.wordpress.android.util.DeviceUtils;
import org.wordpress.android.util.NetworkUtils;
import org.wordpress.android.util.SiteUtils;
Expand Down Expand Up @@ -116,6 +117,7 @@ public class SitePickerActivity extends LocaleAwareActivity
@Inject Dispatcher mDispatcher;
@Inject StatsStore mStatsStore;
@Inject ViewModelProvider.Factory mViewModelFactory;
@Inject BuildConfigWrapper mBuildConfigWrapper;

@Override
public void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -241,7 +243,7 @@ private void updateMenuItemVisibility() {
} else {
// don't allow editing visibility unless there are multiple wp.com and jetpack sites
mMenuEdit.setVisible(mSiteStore.getSitesAccessedViaWPComRestCount() > 1);
mMenuAdd.setVisible(!BuildConfig.IS_JETPACK_APP);
mMenuAdd.setVisible(mBuildConfigWrapper.isSiteCreationEnabled());
}

// no point showing search if there aren't multiple blogs
Expand Down Expand Up @@ -753,18 +755,26 @@ public void onDestroyActionMode(ActionMode actionMode) {
}
}

public static void addSite(Activity activity, boolean isSignedInWpCom) {
// if user is signed into wp.com use the dialog to enable choosing whether to
// create a new wp.com blog or add a self-hosted one
if (isSignedInWpCom) {
DialogFragment dialog = new AddSiteDialog();
dialog.show(activity.getFragmentManager(), AddSiteDialog.ADD_SITE_DIALOG_TAG);
public static void addSite(Activity activity, boolean hasAccessToken) {
if (hasAccessToken) {
if (!BuildConfig.ENABLE_ADD_SELF_HOSTED_SITE) {
ActivityLauncher.newBlogForResult(activity);
} else {
// user is signed into wordpress app, so use the dialog to enable choosing whether to
// create a new wp.com blog or add a self-hosted one
showAddSiteDialog(activity);
}
} else {
// user isn't signed into wp.com, so simply enable adding self-hosted
// user doesn't have an access token, so simply enable adding self-hosted
ActivityLauncher.addSelfHostedSiteForResult(activity);
}
}

private static void showAddSiteDialog(Activity activity) {
DialogFragment dialog = new AddSiteDialog();
dialog.show(activity.getFragmentManager(), AddSiteDialog.ADD_SITE_DIALOG_TAG);
}

/*
* dialog which appears after user taps "Add site" - enables choosing whether to create
* a new wp.com blog or add an existing self-hosted one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private boolean isValidPosition(int position) {
}

private boolean isNewLoginEpilogueScreenEnabled() {
return !mBuildConfigWrapper.isJetpackApp()
return mBuildConfigWrapper.isSiteCreationEnabled()
&& !mShowAndReturn;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ && getIntent().getExtras().getBoolean(ARG_CONTINUE_JETPACK_CONNECT, false)) {
this,
getIntent().getBooleanExtra(ARG_DO_LOGIN_UPDATE, false),
getIntent().getIntegerArrayListExtra(ARG_OLD_SITES_IDS),
mBuildConfigWrapper.isJetpackApp()
mBuildConfigWrapper.isSiteCreationEnabled()
);
} else if (getIntent().getBooleanExtra(ARG_SHOW_SIGNUP_EPILOGUE, false) && savedInstanceState == null) {
canShowAppRatingPrompt = false;
Expand Down Expand Up @@ -1279,7 +1279,7 @@ public void onAuthenticationChanged(OnAuthenticationChanged event) {
this,
true,
getIntent().getIntegerArrayListExtra(ARG_OLD_SITES_IDS),
mBuildConfigWrapper.isJetpackApp()
mBuildConfigWrapper.isSiteCreationEnabled()
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class WPMainNavigationView @JvmOverloads constructor(

// overlay each item with our custom view
val menuView = getChildAt(0) as BottomNavigationMenuView
if (BuildConfig.IS_JETPACK_APP) hideReaderTab()
if (!BuildConfig.ENABLE_READER) hideReaderTab()

val inflater = LayoutInflater.from(context)
for (i in 0 until menu.size()) {
Expand Down Expand Up @@ -315,7 +315,7 @@ class WPMainNavigationView @JvmOverloads constructor(
}

companion object {
private val pages = if (BuildConfig.IS_JETPACK_APP) listOf(MY_SITE, NOTIFS) else listOf(MY_SITE, READER, NOTIFS)
private val pages = if (BuildConfig.ENABLE_READER) listOf(MY_SITE, READER, NOTIFS) else listOf(MY_SITE, NOTIFS)

private const val TAG_MY_SITE = "tag-mysite"
private const val TAG_READER = "tag-reader"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class MySiteFragment : Fragment(R.layout.my_site_fragment),
action.site,
CTA_DOMAIN_CREDIT_REDEMPTION
)
is SiteNavigationAction.AddNewSite -> SitePickerActivity.addSite(activity, action.isSignedInWpCom)
is SiteNavigationAction.AddNewSite -> SitePickerActivity.addSite(activity, action.hasAccessToken)
is SiteNavigationAction.ShowQuickStartDialog -> showQuickStartDialog(
action.title,
action.message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import org.wordpress.android.ui.posts.BasicDialogViewModel.DialogInteraction.Dis
import org.wordpress.android.ui.posts.BasicDialogViewModel.DialogInteraction.Negative
import org.wordpress.android.ui.posts.BasicDialogViewModel.DialogInteraction.Positive
import org.wordpress.android.ui.utils.UiString.UiStringRes
import org.wordpress.android.util.BuildConfigWrapper
import org.wordpress.android.util.DisplayUtilsWrapper
import org.wordpress.android.util.FluxCUtilsWrapper
import org.wordpress.android.util.MediaUtilsWrapper
Expand Down Expand Up @@ -121,7 +122,8 @@ class MySiteViewModel @Inject constructor(
private val mySiteSourceManager: MySiteSourceManager,
private val cardsTracker: CardsTracker,
private val siteItemsTracker: SiteItemsTracker,
private val domainRegistrationCardShownTracker: DomainRegistrationCardShownTracker
private val domainRegistrationCardShownTracker: DomainRegistrationCardShownTracker,
private val buildConfigWrapper: BuildConfigWrapper
) : ScopedViewModel(mainDispatcher) {
private val _onSnackbarMessage = MutableLiveData<Event<SnackbarMessageHolder>>()
private val _onTechInputDialogShown = MutableLiveData<Event<TextInputDialogModel>>()
Expand Down Expand Up @@ -345,7 +347,8 @@ class MySiteViewModel @Inject constructor(

private fun buildNoSiteState(): NoSites {
// Hide actionable empty view image when screen height is under specified min height.
val shouldShowImage = displayUtilsWrapper.getDisplayPixelHeight() >= MIN_DISPLAY_PX_HEIGHT_NO_SITE_IMAGE
val shouldShowImage = !buildConfigWrapper.isJetpackApp &&
displayUtilsWrapper.getDisplayPixelHeight() >= MIN_DISPLAY_PX_HEIGHT_NO_SITE_IMAGE
return NoSites(shouldShowImage)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sealed class SiteNavigationAction {
) : SiteNavigationAction()

data class OpenDomainRegistration(val site: SiteModel) : SiteNavigationAction()
data class AddNewSite(val isSignedInWpCom: Boolean) : SiteNavigationAction()
data class AddNewSite(val hasAccessToken: Boolean) : SiteNavigationAction()
data class ShowQuickStartDialog(
@StringRes val title: Int,
@StringRes val message: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CardsBuilder @Inject constructor(
): List<MySiteCardAndItem> {
val cards = mutableListOf<MySiteCardAndItem>()
cards.add(siteInfoCardBuilder.buildSiteInfoCard(siteInfoCardBuilderParams))
if (!buildConfigWrapper.isJetpackApp) {
if (buildConfigWrapper.isQuickActionEnabled) {
cards.add(quickActionsCardBuilder.build(quickActionsCardBuilderParams))
}
if (domainRegistrationCardBuilderParams.isDomainCreditAvailable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ class NotificationsListFragmentPage : ViewPagerFragment(R.layout.notifications_l
}
else -> titleResId = R.string.notifications_empty_list
}
if (BuildConfig.IS_JETPACK_APP) {
showEmptyView(titleResId)
} else {
if (BuildConfig.ENABLE_READER) {
showEmptyView(titleResId, descriptionResId, buttonResId)
} else {
showEmptyView(titleResId)
}
actionableEmptyView.image.visibility = if (DisplayUtils.isLandscape(context)) View.GONE else View.VISIBLE
}
Expand Down
Loading