-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(navigationbar): add NavigationBar plugin #826
Conversation
* @param callbacks {Object} Optional callbacks | ||
*/ | ||
@Cordova() | ||
static setUp(autohide?: boolean = false, callbacks?: {success?: Function, failure?: Function}): void { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should return a Promise.
The decorator should include the following options:
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'failure'
})
Then finally remove the callbacks
parameter.
Like this @ihadeed ? |
successName: 'success', | ||
errorName: 'failure' | ||
}) | ||
static setUp(autohide?: boolean = false): void { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
static setUp(autohide?: boolean = false): Promise<any> { return; }
/** | ||
* Hide the navigation bar. | ||
* @param autohide {boolean} | ||
* @param callbacks {Object} Optional callbacks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line and add:
@return {Promise<any>}
errorName: 'failure' | ||
}) | ||
static setUp(autohide?: boolean = false): Promise<any> { return; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't you missing hideNavigationBar
definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right. This is missing: https://github.com/cranberrygame/cordova-plugin-navigationbar/blob/master/www/navigationbar.js#L12
@Plugin({ | ||
name: 'NavigationBar', | ||
plugin: 'cordova-plugin-navigationbar', | ||
pluginRef: 'plugins.navigationbar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it should be navigationbar
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right.. it is navigationbar
errorName: 'failure' | ||
}) | ||
static setUp(autohide?: boolean = false): Promise<any> { return; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right. This is missing: https://github.com/cranberrygame/cordova-plugin-navigationbar/blob/master/www/navigationbar.js#L12
@Plugin({ | ||
name: 'NavigationBar', | ||
plugin: 'cordova-plugin-navigationbar', | ||
pluginRef: 'plugins.navigationbar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right.. it is navigationbar
No description provided.