-
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 pull request #10267 from wordpress-mobile/issue/9639-refactoring
Move photon url logic from VH to VM
- Loading branch information
Showing
7 changed files
with
82 additions
and
82 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
10 changes: 0 additions & 10 deletions
10
WordPress/src/main/java/org/wordpress/android/ui/posts/PostViewHolderConfig.kt
This file was deleted.
Oops, something went wrong.
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
17 changes: 17 additions & 0 deletions
17
WordPress/src/main/java/org/wordpress/android/ui/reader/utils/ReaderUtilsWrapper.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,17 @@ | ||
package org.wordpress.android.ui.reader.utils | ||
|
||
import dagger.Reusable | ||
import javax.inject.Inject | ||
|
||
/** | ||
* Injectable wrapper around ReaderUtils. | ||
* | ||
* ReaderUtils interface is consisted of static methods, which make the client code difficult to test/mock. Main purpose of | ||
* this wrapper is to make testing easier. | ||
* | ||
*/ | ||
@Reusable | ||
class ReaderUtilsWrapper @Inject constructor() { | ||
fun getResizedImageUrl(imageUrl: String?, width: Int, height: Int, isPrivate: Boolean): String? = | ||
ReaderUtils.getResizedImageUrl(imageUrl, width, height, isPrivate) | ||
} |
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