mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 02:54:42 +00:00
b64b9dbece
Summary: Flow doesn't check .android.js files yet anyway. I'm going to be adding suppressions in a followup diff. It would be nice to not have >1k suppressions saying that we can't do certain things in `flow strict` when we don't even typecheck with regular `flow` just yet I ran these commands to produce this diff: `find . -name '*.android.js' -exec sed -i 's/flow strict-local/flow/g' {} +` `find . -name '*.android.js' -exec sed -i 's/flow strict/flow/g' {} +` Followed https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files to do it. The controller you requested could not be found. Reviewed By: TheSavior Differential Revision: D9143783 fbshipit-source-id: e9af4fe695ebdba4db4083de1697cc248d48eb0d
37 lines
701 B
JavaScript
37 lines
701 B
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* 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';
|
|
|
|
const ToastAndroid = require('ToastAndroid');
|
|
|
|
const TOAST_SHORT_DELAY = 2000;
|
|
|
|
class HMRLoadingView {
|
|
static _showing: boolean;
|
|
|
|
static showMessage(message: string) {
|
|
if (HMRLoadingView._showing) {
|
|
return;
|
|
}
|
|
ToastAndroid.show(message, ToastAndroid.SHORT);
|
|
HMRLoadingView._showing = true;
|
|
setTimeout(() => {
|
|
HMRLoadingView._showing = false;
|
|
}, TOAST_SHORT_DELAY);
|
|
}
|
|
|
|
static hide() {
|
|
// noop
|
|
}
|
|
}
|
|
|
|
module.exports = HMRLoadingView;
|