Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

Commit 79d067b

Browse files
authored
Merge pull request #36 from micahlt/master
Lots of UX changes + feed component
2 parents 1bb0ab1 + 4184ed6 commit 79d067b

26 files changed

Lines changed: 1167 additions & 387 deletions

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "org.scratchclient4.itchy"
77
minSdkVersion rootProject.ext.minSdkVersion
88
targetSdkVersion rootProject.ext.targetSdkVersion
9-
versionCode 10
10-
versionName "0.7.4"
9+
versionCode 11
10+
versionName "0.8.7"
1111
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {

android/app/capacitor.build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ android {
1010
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
1111
dependencies {
1212
implementation project(':capacitor-community-http')
13+
implementation project(':capacitor-app')
14+
implementation project(':capacitor-browser')
15+
implementation project(':capacitor-haptics')
16+
implementation project(':capacitor-keyboard')
17+
implementation project(':capacitor-splash-screen')
18+
implementation project(':capacitor-status-bar')
1319
implementation project(':capacitor-dark-mode')
1420
implementation "androidx.core:core:1.1.0"
1521
}

android/app/src/main/assets/capacitor.config.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,5 @@
44
"bundledWebRuntime": false,
55
"npmClient": "npm",
66
"webDir": "dist",
7-
"plugins": {
8-
"SplashScreen": {
9-
"launchShowDuration": 0
10-
}
11-
},
127
"cordova": {}
138
}

android/app/src/main/java/org/scratchclient4/itchy/MainActivity.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,39 @@
77
import android.webkit.WebSettings;
88
import android.os.Bundle;
99
import android.content.res.Configuration;
10+
11+
import com.capacitorjs.plugins.browser.BrowserPlugin;
12+
import com.capacitorjs.plugins.haptics.HapticsPlugin;
13+
import com.capacitorjs.plugins.splashscreen.SplashScreenPlugin;
1014
import com.getcapacitor.BridgeActivity;
1115
import com.getcapacitor.Plugin;
1216
import com.getcapacitor.plugin.http.Http;
1317

1418
import java.util.ArrayList;
1519

1620
public class MainActivity extends BridgeActivity {
21+
@Override
22+
public void onCreate(Bundle savedInstanceState) {
23+
super.onCreate(savedInstanceState);
24+
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
25+
// Additional plugins you've installed go here
26+
// Ex: registerPlugin(TotallyAwesomePlugin.class);
27+
registerPlugin(Http.class);
28+
registerPlugin(BrowserPlugin.class);
29+
registerPlugin(HapticsPlugin.class);
30+
registerPlugin(SplashScreenPlugin.class);
31+
}});
32+
int nightModeFlags = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
33+
WebSettings webSettings = this.bridge.getWebView().getSettings();
34+
if (nightModeFlags == Configuration.UI_MODE_NIGHT_YES) {
35+
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q) {
36+
webSettings.setForceDark(WebSettings.FORCE_DARK_ON);
37+
}
38+
}
39+
}
40+
/*
41+
The below is depreciated code from Capacitor 2.x
42+
1743
@Override
1844
public void onCreate(Bundle savedInstanceState) {
1945
super.onCreate(savedInstanceState);
@@ -30,5 +56,5 @@ public void onCreate(Bundle savedInstanceState) {
3056
webSettings.setForceDark(WebSettings.FORCE_DARK_ON);
3157
}
3258
}
33-
}
59+
} */
3460
}

android/capacitor.settings.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,23 @@ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/
55
include ':capacitor-community-http'
66
project(':capacitor-community-http').projectDir = new File('../node_modules/@capacitor-community/http/android')
77

8+
include ':capacitor-app'
9+
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
10+
11+
include ':capacitor-browser'
12+
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')
13+
14+
include ':capacitor-haptics'
15+
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
16+
17+
include ':capacitor-keyboard'
18+
project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')
19+
20+
include ':capacitor-splash-screen'
21+
project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android')
22+
23+
include ':capacitor-status-bar'
24+
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
25+
826
include ':capacitor-dark-mode'
927
project(':capacitor-dark-mode').projectDir = new File('../node_modules/capacitor-dark-mode/android')

android/variables.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ext {
22
minSdkVersion = 21
33
compileSdkVersion = 29
44
targetSdkVersion = 29
5+
androidxActivityVersion = '1.2.0'
56
androidxAppCompatVersion = '1.1.0'
67
androidxCoreVersion = '1.2.0'
78
androidxMaterialVersion = '1.1.0-rc02'
@@ -14,4 +15,4 @@ ext {
1415
androidxJunitVersion = '1.1.1'
1516
androidxEspressoCoreVersion = '3.2.0'
1617
cordovaAndroidVersion = '7.0.0'
17-
}
18+
}

capacitor.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"webDir": "dist",
77
"plugins": {
88
"SplashScreen": {
9-
"launchShowDuration": 0
9+
"launchAutoHide": false
1010
}
1111
},
1212
"cordova": {}

0 commit comments

Comments
 (0)