Skip to content
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

chore: Remove StatusBar plugin #3628

Merged
merged 3 commits into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions android/capacitor/src/main/java/com/getcapacitor/Bridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.getcapacitor.plugin.LocalNotifications;
import com.getcapacitor.plugin.PushNotifications;
import com.getcapacitor.plugin.SplashScreen;
import com.getcapacitor.plugin.StatusBar;
import com.getcapacitor.plugin.background.BackgroundTask;
import com.getcapacitor.util.HostMask;
import java.io.File;
Expand Down Expand Up @@ -387,7 +386,6 @@ private void registerAllPlugins() {
this.registerPlugin(Keyboard.class);
this.registerPlugin(PushNotifications.class);
this.registerPlugin(SplashScreen.class);
this.registerPlugin(StatusBar.class);
this.registerPlugin(com.getcapacitor.plugin.WebView.class);

for (Class<? extends Plugin> pluginClass : this.initialPlugins) {
Expand Down
158 changes: 0 additions & 158 deletions android/capacitor/src/main/java/com/getcapacitor/plugin/StatusBar.java

This file was deleted.

81 changes: 0 additions & 81 deletions core/src/core-plugin-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface PluginRegistry {
LocalNotifications: LocalNotificationsPlugin;
PushNotifications: PushNotificationsPlugin;
SplashScreen: SplashScreenPlugin;
StatusBar: StatusBarPlugin;
WebView: WebViewPlugin;

[pluginName: string]: {
Expand Down Expand Up @@ -695,86 +694,6 @@ export interface SplashScreenHideOptions {

//

export interface StatusBarPlugin extends Plugin {
/**
* Set the current style of the status bar
*/
setStyle(options: StatusBarStyleOptions): Promise<void>;
/**
* Set the background color of the status bar
*/
setBackgroundColor(options: StatusBarBackgroundColorOptions): Promise<void>;
/**
* Show the status bar
*/
show(options?: StatusBarAnimationOptions): Promise<void>;
/**
* Hide the status bar
*/
hide(options?: StatusBarAnimationOptions): Promise<void>;
/**
* Get info about the current state of the status bar
*/
getInfo(): Promise<StatusBarInfoResult>;
/**
* Set whether or not the status bar should overlay the webview to allow usage of the space
* around a device "notch"
*/
setOverlaysWebView(options: StatusBarOverlaysWebviewOptions): Promise<void>;
}

export interface StatusBarStyleOptions {
style: StatusBarStyle;
}

export enum StatusBarStyle {
/**
* Light text for dark backgrounds.
*/
Dark = 'DARK',
/**
* Dark text for light backgrounds.
*/
Light = 'LIGHT',
}

export interface StatusBarAnimationOptions {
/**
* iOS only. The type of status bar animation used when showing or hiding.
*/
animation: StatusBarAnimation;
}

export enum StatusBarAnimation {
/**
* No animation during show/hide.
*/
None = 'NONE',
/**
* Slide animation during show/hide.
*/
Slide = 'SLIDE',
/**
* Fade animation during show/hide.
*/
Fade = 'FADE',
}

export interface StatusBarBackgroundColorOptions {
color: string;
}

export interface StatusBarInfoResult {
visible: boolean;
style: StatusBarStyle;
color?: string;
overlays?: boolean;
}

export interface StatusBarOverlaysWebviewOptions {
overlay: boolean;
}

export interface WebViewPlugin extends Plugin {
setServerBasePath(options: WebViewPath): Promise<void>;
getServerBasePath(): Promise<WebViewPath>;
Expand Down
9 changes: 0 additions & 9 deletions ios/Capacitor/Capacitor/Plugins/DefaultPlugins.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@
CAP_PLUGIN_METHOD(hide, CAPPluginReturnPromise);
)

CAP_PLUGIN(CAPStatusBarPlugin, "StatusBar",
CAP_PLUGIN_METHOD(setStyle, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(setBackgroundColor, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(show, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(hide, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getInfo, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(setOverlaysWebView, CAPPluginReturnPromise);
)

CAP_PLUGIN(CAPWebViewPlugin, "WebView",
CAP_PLUGIN_METHOD(setServerBasePath, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getServerBasePath, CAPPluginReturnPromise);
Expand Down
98 changes: 0 additions & 98 deletions ios/Capacitor/Capacitor/Plugins/StatusBar.swift

This file was deleted.