Skip to content

Commit b98ea0b

Browse files
committed
Analysis: Resolve max line length warnings
1 parent 1a1302b commit b98ea0b

File tree

11 files changed

+43
-35
lines changed

11 files changed

+43
-35
lines changed

WordPress/src/main/java/org/wordpress/android/ui/WPWebViewUsageCategory.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import org.wordpress.android.viewmodel.wpwebview.WPWebViewViewModel
44
import org.wordpress.android.viewmodel.wpwebview.WPWebViewViewModel.WebPreviewUiState.WebPreviewFullscreenUiState
55

66
/**
7-
* This enum could be expanded to allow to re-use the WPWebViewActivity (including the direct usage of actionable empty view)
8-
* in other scenarios with different WebPreviewUiState, also menu can be customized with the same principle.
7+
* This enum could be expanded to allow to re-use the WPWebViewActivity (including the direct usage of actionable empty
8+
* view) in other scenarios with different WebPreviewUiState, also menu can be customized with the same principle.
99
*/
1010
enum class WPWebViewUsageCategory constructor(val value: Int, val menuUiState: WPWebViewMenuUiState) {
1111
WEBVIEW_STANDARD(0, WPWebViewMenuUiState()),

WordPress/src/main/java/org/wordpress/android/ui/posts/editor/XPostsCapabilityChecker.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class XPostsCapabilityChecker @Inject constructor(
3535
if (saved.xPosts.isEmpty()) {
3636
// Db was empty, so let's make the api call and ensure there aren't any new xpost suggestions.
3737
// This call will be made every time the editor opens on sites that don't have any xpost
38-
// suggestions, but because the response will almost always be empty, it's not an expensive call.
38+
// suggestions, but because the response will almost always be empty, it's not an expensive
39+
// call.
3940
fetchingReturnsXposts(site)
4041
} else {
4142
// We have xposts saved in the db, so set capability to true even though

WordPress/src/main/java/org/wordpress/android/ui/reader/utils/ReaderUtilsWrapper.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import javax.inject.Inject
1010
/**
1111
* Injectable wrapper around ReaderUtils.
1212
*
13-
* ReaderUtils interface is consisted of static methods, which make the client code difficult to test/mock. Main purpose of
14-
* this wrapper is to make testing easier.
15-
*
13+
* ReaderUtils interface is consisted of static methods, which make the client code difficult to test/mock.
14+
* Main purpose of this wrapper is to make testing easier.
1615
*/
1716
@Reusable
1817
class ReaderUtilsWrapper @Inject constructor(

WordPress/src/main/java/org/wordpress/android/ui/reader/viewmodels/ReaderPostListViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ class ReaderPostListViewModel @Inject constructor(
266266
readerViewModel?.selectedTabChange(tag)
267267
}
268268

269-
// TODO this is related to tracking time spent in reader - we should move it to the parent but also keep it here for !isTopLevel :(
269+
// TODO this is related to tracking time spent in reader -
270+
// we should move it to the parent but also keep it here for !isTopLevel :(
270271
fun onFragmentResume(
271272
isTopLevelFragment: Boolean,
272273
isSearch: Boolean,

WordPress/src/main/java/org/wordpress/android/ui/stories/SaveStoryGutenbergBlockUseCase.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ class SaveStoryGutenbergBlockUseCase @Inject constructor(
168168
gson.fromJson(mediaFilesJsonString, StoryBlockData::class.java)
169169
storyBlockData?.let { storyBlockDataNonNull ->
170170
val localMediaId = mediaFile.id.toString()
171-
// now replace matching localMediaId with remoteMediaId in the mediaFileObjects, obtain the URLs and replace
171+
// now replace matching localMediaId with remoteMediaId in the mediaFileObjects,
172+
// obtain the URLs and replace
172173
val mediaFiles = storyBlockDataNonNull.mediaFiles.filter { it.id == localMediaId }
173174
if (mediaFiles.isNotEmpty()) {
174175
mediaFiles[0].apply {

WordPress/src/main/java/org/wordpress/android/ui/stories/StoryComposerActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,8 @@ class StoryComposerActivity : ComposeLoopFrameActivity(),
619619
frame.id = storyMediaFileData.id
620620
storyMediaFileDataList.add(storyMediaFileData)
621621
}
622-
// if the frame.id is populated and is not a temporary id, this should be an actual MediaModel mediaId so,
623-
// let's use that to obtain the mediaFile and then replace it with the temporary frame.id
622+
// if the frame.id is populated and is not a temporary id, this should be an actual MediaModel mediaId
623+
// so, let's use that to obtain the mediaFile and then replace it with the temporary frame.id
624624
else -> {
625625
frame.id?.let {
626626
if (it.startsWith(TEMPORARY_ID_PREFIX)) {

WordPress/src/main/java/org/wordpress/android/ui/stories/media/StoryMediaSaveUploadBridge.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ class StoryMediaSaveUploadBridge @Inject constructor(
129129

130130
override fun syncPostObjectWithUiAndSaveIt(listener: OnPostUpdatedFromUIListener?) {
131131
// no op
132-
// WARNING: don't remove this, we need to call the listener no matter what, so save & upload actually happen
132+
// WARNING: don't remove this, we need to call the listener no matter what,
133+
// so save & upload actually happen
133134
listener?.onPostUpdatedFromUI(null)
134135
}
135136

@@ -141,8 +142,8 @@ class StoryMediaSaveUploadBridge @Inject constructor(
141142
// in order to support Story editing capabilities, we save a serialized version of the Story slides
142143
// after their composedFrameFiles have been processed.
143144

144-
// here we change the ids on the actual StoryFrameItems, and also update the flattened / composed image
145-
// urls with the new URLs which may have been replaced after image optimization
145+
// here we change the ids on the actual StoryFrameItems, and also update the flattened / composed
146+
// image urls with the new URLs which may have been replaced after image optimization
146147
// find the MediaModel for a given Uri from composedFrameFile
147148
for (frame in frames) {
148149
// if the old URI in frame.composedFrameFile exists as a key in the passed map, then update that

WordPress/src/main/java/org/wordpress/android/ui/whatsnew/FeatureAnnouncementViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ class FeatureAnnouncementViewModel @Inject constructor(
6868

6969
private fun loadFeatures() {
7070
launch {
71+
// fallback to remote just in case. Should not happen.
7172
val latestAnnouncement = featureAnnouncementProvider.getLatestFeatureAnnouncement(true)
72-
?: featureAnnouncementProvider.getLatestFeatureAnnouncement(false) // fallback to remote just in case. Should not happen.
73+
?: featureAnnouncementProvider.getLatestFeatureAnnouncement(false)
7374
if (latestAnnouncement != null) {
7475
appPrefsWrapper.featureAnnouncementShownVersion = latestAnnouncement.announcementVersion
7576
appPrefsWrapper.lastFeatureAnnouncementAppVersionCode = buildConfigWrapper.getAppVersionCode()

WordPress/src/main/java/org/wordpress/android/util/config/AppConfig.kt

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class AppConfig
1616
private val manualFeatureConfig: ManualFeatureConfig
1717
) {
1818
/**
19-
* We need to keep the value of an already loaded feature flag to make sure the value is not changed while using the app.
20-
* We should only reload the flags when the application is created.
19+
* We need to keep the value of an already loaded feature flag to make sure the value is not changed
20+
* while using the app. We should only reload the flags when the application is created.
2121
*/
2222
private val experimentValues = mutableMapOf<String, String>()
2323
private val remoteConfigCheck = RemoteConfigCheck(this)
@@ -38,8 +38,8 @@ class AppConfig
3838
}
3939

4040
/**
41-
* Get the enabled state of a feature flag. If the flag is enabled in the BuildConfig file, it overrides the
42-
* remote value. The correct approach is to disable a feature flag for a release version and only enable it remotely.
41+
* Get the enabled state of a feature flag. If the flag is enabled in the BuildConfig file, it overrides the remote
42+
* value. The correct approach is to disable a feature flag for a release version and only enable it remotely.
4343
* Once the feature is ready to be fully released, we can enable the BuildConfig value.
4444
* @param feature feature which we're checking remotely
4545
*/
@@ -90,10 +90,24 @@ class AppConfig
9090
}
9191

9292
sealed class FeatureState(open val isEnabled: Boolean, val name: String) {
93-
data class ManuallyOverriden(override val isEnabled: Boolean) : FeatureState(isEnabled, "manually_overriden")
94-
data class BuildConfigValue(override val isEnabled: Boolean) : FeatureState(isEnabled, "build_config_value")
95-
data class RemoteValue(override val isEnabled: Boolean) : FeatureState(isEnabled, "remote_source_value")
96-
data class StaticValue(override val isEnabled: Boolean) : FeatureState(isEnabled, "static_source_value")
97-
data class DefaultValue(override val isEnabled: Boolean) : FeatureState(isEnabled, "default_source_value")
93+
data class ManuallyOverriden(
94+
override val isEnabled: Boolean
95+
) : FeatureState(isEnabled, "manually_overriden")
96+
97+
data class BuildConfigValue(
98+
override val isEnabled: Boolean
99+
) : FeatureState(isEnabled, "build_config_value")
100+
101+
data class RemoteValue(
102+
override val isEnabled: Boolean
103+
) : FeatureState(isEnabled, "remote_source_value")
104+
105+
data class StaticValue(
106+
override val isEnabled: Boolean
107+
) : FeatureState(isEnabled, "static_source_value")
108+
109+
data class DefaultValue(
110+
override val isEnabled: Boolean
111+
) : FeatureState(isEnabled, "default_source_value")
98112
}
99113
}

WordPress/src/main/java/org/wordpress/android/util/image/ImageManager.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ class ImageManager @Inject constructor(
333333
}
334334

335335
/**
336-
* Loads an image from the "imgUri" into the ImageView. Doing this allows content and remote URIs to interchangeable.
336+
* Loads an image from the "imgUri" into the ImageView. Doing this allows content and remote URIs to
337+
* interchangeable.
337338
* Adds a placeholder and an error placeholder depending
338339
* on the ImageType. Attaches the ResultListener so the client can manually show/hide progress and error
339340
* views or add a PhotoViewAttacher(adds support for pinch-to-zoom gesture). Optionally adds

0 commit comments

Comments
 (0)