-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename HMRLoadingView to LoadingView
Summary: This view will be re-used for bundle splitting so I'm changing the name to be more generic as it can be used for informing users of any loading activity. I also cleaned up the files a bit from a class to just an object. Reviewed By: gaearon Differential Revision: D16281367 fbshipit-source-id: 5c2ee7790d29ccba473bd6e90737d2f0581e6291
- Loading branch information
1 parent
93bebf1
commit ba8f88d
Showing
8 changed files
with
50 additions
and
69 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
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
* @flow | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import ToastAndroid from '../Components/ToastAndroid/ToastAndroid'; | ||
|
||
const TOAST_SHORT_DELAY = 2000; | ||
let isVisible = false; | ||
|
||
module.exports = { | ||
showMessage(message: string) { | ||
if (!isVisible) { | ||
ToastAndroid.show(message, ToastAndroid.SHORT); | ||
isVisible = true; | ||
setTimeout(() => { | ||
isVisible = false; | ||
}, TOAST_SHORT_DELAY); | ||
} | ||
}, | ||
hide() {}, | ||
}; |
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
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