-
Notifications
You must be signed in to change notification settings - Fork 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 #9995 from b1tjoy/fix/9183-prevent-avatar-icon-fro…
…m-flicker fix: prevent avatar icon from flicker on Web
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Avatar icon flickers when message is sent for the first time, return and set the source as | ||
* defaultSource prop of image to prevent avatar icon from flicker when running on Web/Desktop | ||
* @param {String|Function} source The source of avatar image | ||
* @return {Object} The image source | ||
*/ | ||
export default source => ({uri: source}); |
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,5 @@ | ||
/** | ||
* Avatar icon does not flicker when running on Native, return and set undefined as defaultSource prop of image | ||
* @return {Object} undefined | ||
*/ | ||
export default () => undefined; |