Skip to content

Commit

Permalink
Merge pull request #36 from micahlt/master
Browse files Browse the repository at this point in the history
Lots of UX changes + feed component
  • Loading branch information
micahlt authored Oct 3, 2021
2 parents 1bb0ab1 + 4184ed6 commit 79d067b
Show file tree
Hide file tree
Showing 26 changed files with 1,167 additions and 387 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "org.scratchclient4.itchy"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 10
versionName "0.7.4"
versionCode 11
versionName "0.8.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
6 changes: 6 additions & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ android {
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-http')
implementation project(':capacitor-app')
implementation project(':capacitor-browser')
implementation project(':capacitor-haptics')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-status-bar')
implementation project(':capacitor-dark-mode')
implementation "androidx.core:core:1.1.0"
}
Expand Down
5 changes: 0 additions & 5 deletions android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@
"bundledWebRuntime": false,
"npmClient": "npm",
"webDir": "dist",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
},
"cordova": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,39 @@
import android.webkit.WebSettings;
import android.os.Bundle;
import android.content.res.Configuration;

import com.capacitorjs.plugins.browser.BrowserPlugin;
import com.capacitorjs.plugins.haptics.HapticsPlugin;
import com.capacitorjs.plugins.splashscreen.SplashScreenPlugin;
import com.getcapacitor.BridgeActivity;
import com.getcapacitor.Plugin;
import com.getcapacitor.plugin.http.Http;

import java.util.ArrayList;

public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
// Ex: registerPlugin(TotallyAwesomePlugin.class);
registerPlugin(Http.class);
registerPlugin(BrowserPlugin.class);
registerPlugin(HapticsPlugin.class);
registerPlugin(SplashScreenPlugin.class);
}});
int nightModeFlags = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
WebSettings webSettings = this.bridge.getWebView().getSettings();
if (nightModeFlags == Configuration.UI_MODE_NIGHT_YES) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q) {
webSettings.setForceDark(WebSettings.FORCE_DARK_ON);
}
}
}
/*
The below is depreciated code from Capacitor 2.x
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -30,5 +56,5 @@ public void onCreate(Bundle savedInstanceState) {
webSettings.setForceDark(WebSettings.FORCE_DARK_ON);
}
}
}
} */
}
18 changes: 18 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,23 @@ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/
include ':capacitor-community-http'
project(':capacitor-community-http').projectDir = new File('../node_modules/@capacitor-community/http/android')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')

include ':capacitor-browser'
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')

include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')

include ':capacitor-keyboard'
project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')

include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android')

include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')

include ':capacitor-dark-mode'
project(':capacitor-dark-mode').projectDir = new File('../node_modules/capacitor-dark-mode/android')
3 changes: 2 additions & 1 deletion android/variables.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ext {
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
androidxActivityVersion = '1.2.0'
androidxAppCompatVersion = '1.1.0'
androidxCoreVersion = '1.2.0'
androidxMaterialVersion = '1.1.0-rc02'
Expand All @@ -14,4 +15,4 @@ ext {
androidxJunitVersion = '1.1.1'
androidxEspressoCoreVersion = '3.2.0'
cordovaAndroidVersion = '7.0.0'
}
}
2 changes: 1 addition & 1 deletion capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"webDir": "dist",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
"launchAutoHide": false
}
},
"cordova": {}
Expand Down
Loading

0 comments on commit 79d067b

Please sign in to comment.