Skip to content

Commit 4eee7ad

Browse files
committed
Analysis: Resolve name shadowed warnings
Warning Message: "Name shadowed: xyz" Renaming the shadowed and/or the shadowing 'xyz' name is the recommended action to resolve this kind of deprecated warnings.
1 parent 4a4f280 commit 4eee7ad

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

WordPress/src/main/java/org/wordpress/android/ui/notifications/utils/FormattableContentClickHandler.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ class FormattableContentClickHandler @Inject constructor(
6464
showPostActivity(activity, siteId, id)
6565
COMMENT -> {
6666
// Load the comment in the reader list if it exists, otherwise show a webview
67-
val postId = clickedSpan.postId ?: clickedSpan.rootId ?: 0
68-
if (ReaderUtils.postAndCommentExists(siteId, postId, id)) {
69-
showReaderCommentsList(activity, siteId, postId, id, ACTIVITY_LOG_DETAIL)
67+
val rootId = clickedSpan.postId ?: clickedSpan.rootId ?: 0
68+
if (ReaderUtils.postAndCommentExists(siteId, rootId, id)) {
69+
showReaderCommentsList(activity, siteId, rootId, id, ACTIVITY_LOG_DETAIL)
7070
} else {
7171
showWebViewActivityForUrl(activity, clickedSpan.url, rangeType)
7272
}

WordPress/src/main/java/org/wordpress/android/ui/sitecreation/verticals/VerticalsSearchResultsProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class VerticalsSearchResultsProvider @Inject constructor(localeManagerWrapper: L
1111

1212
fun search(items: List<IntentListItemUiState>, query: String) = if (query.isEmpty()) items else items.filter {
1313
val text = it.verticalText.lowercase(locale)
14-
val query = query.lowercase(locale)
15-
text.contains(query)
14+
val lowercasedQuery = query.lowercase(locale)
15+
text.contains(lowercasedQuery)
1616
}
1717
}

0 commit comments

Comments
 (0)