Skip to content

Commit

Permalink
Merge pull request #20016 from wordpress-mobile/issue/stories-removal
Browse files Browse the repository at this point in the history
Stories removal
  • Loading branch information
Antonis Lilis authored Mar 4, 2024
2 parents 50f27a4 + 0bd3e14 commit 0cecd32
Show file tree
Hide file tree
Showing 120 changed files with 115 additions and 6,317 deletions.
3 changes: 3 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

24.4
-----
* [***] [Jetpack-only] Improved Notifications experience with richer UI elements and interactions [https://github.com/wordpress-mobile/WordPress-Android/pull/20072]
* [**] [Jetpack-only] Block editor: Introduce VideoPress v5 support, to fix issues using video block with dotcom and Jetpack sites [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6634]
* [**] [internal] Removed the Stories from the codebase [https://github.com/wordpress-mobile/WordPress-Android/pull/20016]
[***] [Jetpack-only] Stats: Introducing Traffic tab, delivering improved graphs, and combining Days/Weeks/Months/Years tabs into one, behind a feature flag. [https://github.com/wordpress-mobile/WordPress-Android/pull/19942]
[***] [Jetpack-only] Improved Notifications experience with richer UI elements and interactions [https://github.com/wordpress-mobile/WordPress-Android/pull/20072]
* [**] [Jetpack-only] Block editor: Introduce VideoPress v5 support, to fix issues using video block with dotcom and Jetpack sites [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6634]
Expand Down
8 changes: 0 additions & 8 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ repositories {
includeGroup "org.wordpress.gutenberg-mobile"
includeGroupByRegex "org.wordpress.react-native-libraries.*"
includeGroup "com.automattic"
includeGroup "com.automattic.stories"
includeGroup "com.automattic.tracks"
}
}
Expand Down Expand Up @@ -375,11 +374,6 @@ dependencies {
exclude group: 'org.wordpress', module: 'utils'
}
implementation "$gradle.ext.aboutAutomatticBinaryPath:$automatticAboutVersion"
implementation ("$gradle.ext.storiesAndroidPath:$automatticStoriesVersion") {
exclude group: 'androidx.navigation', module: 'navigation-fragment-ktx'
exclude group: 'androidx.navigation', module: 'navigation-ui-ktx'
}
implementation "$gradle.ext.storiesAndroidMp4ComposePath:$automatticStoriesVersion"

implementation("$gradle.ext.tracksBinaryPath") {
version {
Expand Down Expand Up @@ -470,8 +464,6 @@ dependencies {
implementation "com.google.dagger:hilt-android:$gradle.ext.daggerVersion"
kapt "com.google.dagger:hilt-compiler:$gradle.ext.daggerVersion"

testImplementation "$gradle.ext.storiesAndroidPhotoEditorPath:$automatticStoriesVersion"

testImplementation("androidx.arch.core:core-testing:$androidxArchCoreVersion", {
exclude group: 'com.android.support', module: 'support-compat'
exclude group: 'com.android.support', module: 'support-annotations'
Expand Down
8 changes: 0 additions & 8 deletions WordPress/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,6 @@
android:value=".ui.posts.PostsListActivity" />
</activity>

<!-- Story composer activity -->
<activity
android:name=".ui.stories.StoryComposerActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/WordPress.Stories.Immersive">
</activity>

<activity
android:name=".ui.posts.PostsListActivity"
android:launchMode="singleTop"
Expand Down
40 changes: 0 additions & 40 deletions WordPress/src/main/java/org/wordpress/android/AppInitializer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ import com.google.android.gms.auth.api.Auth
import com.google.android.gms.common.api.GoogleApiClient
import com.google.firebase.iid.FirebaseInstanceId
import com.wordpress.rest.RestClient
import com.wordpress.stories.compose.NotificationTrackerProvider
import com.wordpress.stories.compose.frame.StoryNotificationType
import com.wordpress.stories.compose.frame.StoryNotificationType.STORY_FRAME_SAVE_ERROR
import com.wordpress.stories.compose.frame.StoryNotificationType.STORY_FRAME_SAVE_SUCCESS
import com.wordpress.stories.compose.frame.StoryNotificationType.STORY_SAVE_ERROR
import com.wordpress.stories.compose.frame.StoryNotificationType.STORY_SAVE_SUCCESS
import kotlinx.coroutines.CoroutineScope
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
Expand Down Expand Up @@ -76,7 +70,6 @@ import org.wordpress.android.networking.ConnectionChangeReceiver
import org.wordpress.android.networking.OAuthAuthenticator
import org.wordpress.android.networking.RestClientUtils
import org.wordpress.android.push.GCMRegistrationScheduler
import org.wordpress.android.push.NotificationType
import org.wordpress.android.support.ZendeskHelper
import org.wordpress.android.ui.ActivityId
import org.wordpress.android.ui.debug.cookies.DebugCookieManager
Expand All @@ -93,7 +86,6 @@ import org.wordpress.android.ui.posts.editor.ImageEditorTracker
import org.wordpress.android.ui.prefs.AppPrefs
import org.wordpress.android.ui.reader.tracker.ReaderTracker
import org.wordpress.android.ui.stats.refresh.lists.widget.WidgetUpdater.StatsWidgetUpdaters
import org.wordpress.android.ui.stories.media.StoryMediaSaveUploadBridge
import org.wordpress.android.ui.uploads.UploadService
import org.wordpress.android.ui.uploads.UploadStarter
import org.wordpress.android.util.AppLog
Expand Down Expand Up @@ -171,9 +163,6 @@ class AppInitializer @Inject constructor(
@Inject
lateinit var imageEditorTracker: ImageEditorTracker

@Inject
lateinit var storyMediaSaveUploadBridge: StoryMediaSaveUploadBridge

@Inject
lateinit var crashLogging: CrashLogging

Expand Down Expand Up @@ -233,8 +222,6 @@ class AppInitializer @Inject constructor(
lateinit var jetpackFeatureRemovalPhaseHelper: JetpackFeatureRemovalPhaseHelper

private lateinit var applicationLifecycleMonitor: ApplicationLifecycleMonitor
lateinit var storyNotificationTrackerProvider: StoryNotificationTrackerProvider
private set

@Suppress("DEPRECATION")
private lateinit var credentialsClient: GoogleApiClient
Expand Down Expand Up @@ -368,10 +355,6 @@ class AppInitializer @Inject constructor(
systemNotificationsTracker.checkSystemNotificationsState()
ImageEditorInitializer.init(imageManager, imageEditorTracker, imageEditorFileUtils, appScope)

storyNotificationTrackerProvider = StoryNotificationTrackerProvider()
storyMediaSaveUploadBridge.init(application)
ProcessLifecycleOwner.get().lifecycle.addObserver(storyMediaSaveUploadBridge)

exPlat.forceRefresh()

debugCookieManager.sync()
Expand Down Expand Up @@ -969,29 +952,6 @@ class AppInitializer @Inject constructor(
}
}

inner class StoryNotificationTrackerProvider : NotificationTrackerProvider {
private fun translateNotificationTypes(storyNotificationType: StoryNotificationType): NotificationType {
return when (storyNotificationType) {
STORY_SAVE_SUCCESS -> NotificationType.STORY_SAVE_SUCCESS
STORY_SAVE_ERROR -> NotificationType.STORY_SAVE_ERROR
STORY_FRAME_SAVE_SUCCESS -> NotificationType.STORY_FRAME_SAVE_SUCCESS
STORY_FRAME_SAVE_ERROR -> NotificationType.STORY_FRAME_SAVE_ERROR
}
}

override fun trackShownNotification(storyNotificationType: StoryNotificationType) {
systemNotificationsTracker.trackShownNotification(translateNotificationTypes(storyNotificationType))
}

override fun trackTappedNotification(storyNotificationType: StoryNotificationType) {
systemNotificationsTracker.trackTappedNotification(translateNotificationTypes(storyNotificationType))
}

override fun trackDismissedNotification(storyNotificationType: StoryNotificationType) {
systemNotificationsTracker.trackDismissedNotification(translateNotificationTypes(storyNotificationType))
}
}

private fun updateNotificationSettings() {
if (!jetpackFeatureRemovalPhaseHelper.shouldShowNotifications()) {
NotificationsUtils.cancelAllNotifications(application)
Expand Down
4 changes: 0 additions & 4 deletions WordPress/src/main/java/org/wordpress/android/WordPress.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.app.Application
import android.content.Context
import com.android.volley.RequestQueue
import dagger.hilt.EntryPoints
import org.wordpress.android.AppInitializer.StoryNotificationTrackerProvider
import org.wordpress.android.fluxc.tools.FluxCImageLoader
import org.wordpress.android.modules.AppComponent

Expand All @@ -13,9 +12,6 @@ import org.wordpress.android.modules.AppComponent
* application. Containing public static variables and methods to be accessed by other classes.
*/
abstract class WordPress : Application() {
val storyNotificationTrackerProvider: StoryNotificationTrackerProvider
get() = initializer().storyNotificationTrackerProvider

abstract fun initializer(): AppInitializer

fun component(): AppComponent = EntryPoints.get(this, AppComponent::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class UserFlagsProviderHelper @Inject constructor(
UndeletablePrefKey.BOOKMARKS_SAVED_LOCALLY_DIALOG_SHOWN.name,
UndeletablePrefKey.SWIPE_TO_NAVIGATE_NOTIFICATIONS.name,
UndeletablePrefKey.SWIPE_TO_NAVIGATE_READER.name,
UndeletablePrefKey.SHOULD_SHOW_STORIES_INTRO.name,
UndeletablePrefKey.SHOULD_SHOW_STORAGE_WARNING.name,
UndeletablePrefKey.LAST_USED_USER_ID.name,
contextProvider.getContext().getString(R.string.pref_key_app_theme),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@
import org.wordpress.android.ui.stats.refresh.lists.widget.weeks.WeekViewsWidgetListProvider;
import org.wordpress.android.ui.stats.refresh.lists.widget.weeks.WeekWidgetBlockListProviderFactory;
import org.wordpress.android.ui.stockmedia.StockMediaPickerActivity;
import org.wordpress.android.ui.stories.StoryComposerActivity;
import org.wordpress.android.ui.stories.intro.StoriesIntroDialogFragment;
import org.wordpress.android.ui.suggestion.SuggestionActivity;
import org.wordpress.android.ui.suggestion.adapters.SuggestionAdapter;
import org.wordpress.android.ui.themes.ThemeBrowserFragment;
Expand Down Expand Up @@ -458,11 +456,6 @@ public interface AppComponent {
void inject(FeatureAnnouncementDialogFragment object);

void inject(FeatureAnnouncementListAdapter object);

void inject(StoryComposerActivity object);

void inject(StoriesIntroDialogFragment object);

void inject(ReaderDiscoverFragment object);

void inject(ReaderSearchActivity object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
import org.wordpress.android.ui.stats.refresh.lists.widget.configuration.StatsSiteSelectionViewModel;
import org.wordpress.android.ui.stats.refresh.lists.widget.configuration.StatsWidgetConfigureViewModel;
import org.wordpress.android.ui.stats.refresh.lists.widget.minified.StatsMinifiedWidgetConfigureViewModel;
import org.wordpress.android.ui.stories.StoryComposerViewModel;
import org.wordpress.android.ui.stories.intro.StoriesIntroViewModel;
import org.wordpress.android.ui.suggestion.SuggestionViewModel;
import org.wordpress.android.ui.whatsnew.FeatureAnnouncementViewModel;
import org.wordpress.android.viewmodel.ViewModelFactory;
Expand Down Expand Up @@ -359,16 +357,6 @@ abstract class ViewModelModule {
@ViewModelKey(PrepublishingPublishSettingsViewModel.class)
abstract ViewModel prepublishingPublishSettingsViewModel(PrepublishingPublishSettingsViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(StoryComposerViewModel.class)
abstract ViewModel storyComposerViewModel(StoryComposerViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(StoriesIntroViewModel.class)
abstract ViewModel storiesIntroViewModel(StoriesIntroViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(PhotoPickerViewModel.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ enum class NotificationType {
MEDIA_UPLOAD_SUCCESS,
MEDIA_UPLOAD_ERROR,
POST_PUBLISHED,
STORY_SAVE_SUCCESS,
STORY_SAVE_ERROR,
STORY_FRAME_SAVE_SUCCESS,
STORY_FRAME_SAVE_ERROR,
BLOGGING_REMINDERS,
CREATE_SITE,
WEEKLY_ROUNDUP,
Expand Down
Loading

0 comments on commit 0cecd32

Please sign in to comment.