Skip to content
Permalink
Browse files

Remove deprecated calls from StatusBarIOS

Reviewed By: nicklockwood

Differential Revision: D3346701

fbshipit-source-id: 17809a4cd686f3b431257e85d85770aee640bbc9
  • Loading branch information...
javache authored and Facebook Github Bot 0 committed Jun 6, 2016
1 parent 72b363d commit 4de616b4c1a9d3556632a93504828f0539fa4fa5

This file was deleted.

@@ -243,10 +243,6 @@ const APIExamples: Array<UIExplorerExample> = [
key: 'SnapshotExample',
module: require('./SnapshotExample'),
},
{
key: 'StatusBarIOSExample',
module: require('./StatusBarIOSExample'),
},
{
key: 'TimerExample',
module: require('./TimerExample'),
@@ -12,33 +12,11 @@
'use strict';

const NativeEventEmitter = require('NativeEventEmitter');
const StatusBar = require('StatusBar');
const StatusBarManager = require('NativeModules').StatusBarManager;

import type {StatusBarStyle, StatusBarAnimation} from 'StatusBar';
const { StatusBarManager } = require('NativeModules');

/**
* Deprecated. Use `StatusBar` instead.
* Use `StatusBar` for mutating the status bar.
*/
class StatusBarIOS extends NativeEventEmitter {

setStyle(style: StatusBarStyle, animated?: boolean) {
console.warn('`StatusBarIOS.setStyle` is deprecated. Use `StatusBar.setBarStyle` instead.');
StatusBar.setBarStyle(style, animated);
}

setHidden(hidden: boolean, animation?: StatusBarAnimation) {
console.warn('`StatusBarIOS.setHidden` is deprecated. Use `StatusBar.setHidden` instead.');
StatusBar.setHidden(hidden, animation);
}

setNetworkActivityIndicatorVisible(visible: boolean) {
console.warn(
'`StatusBarIOS.setNetworkActivityIndicatorVisible` is deprecated. ' +
'Use `StatusBar.setNetworkActivityIndicatorVisible` instead.'
);
StatusBar.setNetworkActivityIndicatorVisible(visible);
}
}
class StatusBarIOS extends NativeEventEmitter {}

module.exports = new StatusBarIOS(StatusBarManager);

2 comments on commit 4de616b

@janicduplessis

This comment has been minimized.

Copy link
Collaborator

replied Jun 6, 2016

Should we just completely remove StatusBarIOS and move the event emitting to StatusBar?

@javache

This comment has been minimized.

Copy link
Member Author

replied Jun 6, 2016

Not right now, I want to decouple EventEmitter and React, and StatusBar right now depends on React and EventEmitter on StatusBarIOS.

Please sign in to comment.
You can’t perform that action at this time.