Skip to content

Commit 79f9e0d

Browse files
Merge pull request #85 from Maxeh/master
Function dismissDirectly added
2 parents c6b1e26 + 05f23d0 commit 79f9e0d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

DropdownAlert.js

+17
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,23 @@ export default class DropdownAlert extends Component {
241241
}.bind(this), (this.state.duration))
242242
}
243243
}
244+
dismissDirectly() {
245+
if (this.state.isOpen) {
246+
if (closeTimeoutId != null) {
247+
clearTimeout(closeTimeoutId)
248+
}
249+
this.setState({
250+
isOpen: false
251+
})
252+
if (this.props.updateStatusBar) {
253+
if (Platform.OS == 'android') {
254+
StatusBar.setBackgroundColor(this.props.inactiveStatusBarBackgroundColor, true)
255+
} else {
256+
StatusBar.setBarStyle(this.props.inactiveStatusBarStyle, true)
257+
}
258+
}
259+
}
260+
}
244261
onClose(action) {
245262
if (action == undefined) {
246263
action = 'programmatic'

0 commit comments

Comments
 (0)