-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into Parent-PR-for-updating-targetSdkVersion-to-…
…33-(Android-13) # Conflicts: # build.gradle
- Loading branch information
Showing
46 changed files
with
2,728 additions
and
1,966 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
You can now transform most types of blocks into other block types, like quotes, columns, and groups. | ||
No updates this week. In the meantime, we're just over here cooling our jets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
You can now transform most types of blocks into other block types, like quotes, columns, and groups. | ||
When you log in to a self-hosted site that connects to Jetpack through individual plugins, you’ll see a pop-up stating that this type of connection doesn’t support the app’s core features yet. You can get around that problem by switching over to the Jetpack app. Up, up, and away. |
35 changes: 35 additions & 0 deletions
35
WordPress/src/main/java/org/wordpress/android/ui/domains/DashboardCardDomainUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.wordpress.android.ui.domains | ||
|
||
import org.wordpress.android.fluxc.model.SiteModel | ||
import org.wordpress.android.ui.prefs.AppPrefsWrapper | ||
import org.wordpress.android.util.BuildConfigWrapper | ||
import org.wordpress.android.util.config.DashboardCardDomainFeatureConfig | ||
import javax.inject.Inject | ||
|
||
class DashboardCardDomainUtils @Inject constructor( | ||
private val appPrefsWrapper: AppPrefsWrapper, | ||
private val dashboardCardDomainFeatureConfig: DashboardCardDomainFeatureConfig, | ||
private val buildConfigWrapper: BuildConfigWrapper, | ||
) { | ||
fun shouldShowCard(siteModel: SiteModel, isDomainCreditAvailable: Boolean): Boolean { | ||
return isDashboardCardDomainEnabled() && | ||
!isDashboardCardDomainHiddenByUser(siteModel.siteId) && | ||
(siteModel.isWPCom || siteModel.isWPComAtomic) && | ||
siteModel.isAdmin && | ||
// !hasSiteDomains(siteModel) && // this may need a separate api call! | ||
!isDomainCreditAvailable | ||
} | ||
|
||
fun hideCard(siteId: Long) { | ||
appPrefsWrapper.setShouldHideDashboardDomainCard(siteId, true) | ||
} | ||
|
||
private fun isDashboardCardDomainHiddenByUser(siteId: Long): Boolean { | ||
return appPrefsWrapper.getShouldHideDashboardDomainCard(siteId) | ||
} | ||
|
||
private fun isDashboardCardDomainEnabled(): Boolean { | ||
return buildConfigWrapper.isJetpackApp && | ||
dashboardCardDomainFeatureConfig.isEnabled() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.