git ssb

1+

andrestaltz / DatInstaller



Tree: 57f715d7df7dc32f4a285df821933c0f7e0afa97

Files: 57f715d7df7dc32f4a285df821933c0f7e0afa97 / index.android.js

1348 bytesRaw
1import RNNode from "react-native-node";
2import { run } from "@cycle/run";
3import { makeHTTPDriver } from "@cycle/http";
4import { makeSingleScreenNavDrivers } from "cycle-native-navigation";
5import onionify from "cycle-onionify";
6import { navigatorStyle } from "./lib/styles";
7import apkInstallerDriver from "./lib/drivers/apk-installer";
8import packageInfoDriver from "./lib/drivers/package-info";
9import main from "./lib/main";
10import { NativeModules } from "react-native";
11
12const { screenVNodeDriver, commandDriver } = makeSingleScreenNavDrivers(
13 ["DatInstaller.Central", "DatInstaller.Addition", "DatInstaller.Details"],
14 {
15 screen: {
16 screen: "DatInstaller.Central",
17 title: "Dat Installer",
18 navigatorStyle: navigatorStyle,
19 },
20 },
21);
22
23run(onionify(main), {
24 screen: screenVNodeDriver,
25 navCommand: commandDriver,
26 http: makeHTTPDriver(),
27 packageInfo: packageInfoDriver,
28 installApk: apkInstallerDriver,
29});
30
31RNNode.start();
32
33const startedListener = () => {
34 RNNode.start();
35 NativeModules.ActivityCallbacks.setStartedListener(startedListener);
36};
37NativeModules.ActivityCallbacks.setStartedListener(startedListener);
38
39const stoppedListener = () => {
40 RNNode.stop();
41 NativeModules.ActivityCallbacks.setStoppedListener(stoppedListener);
42};
43NativeModules.ActivityCallbacks.setStoppedListener(stoppedListener);
44

Built with git-ssb-web