Skip to content

Commit

Permalink
Fix misaligned permission button and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffc committed Oct 20, 2024
1 parent 66d2038 commit 2427526
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/backgroundtask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { CheyenneSocket } from "./cheyenne";
import { NativeModules, NativeEventEmitter } from "react-native";
import { PermissionsAndroid } from "react-native";
import { STORAGE_KEY_RUN_BACKGROUND_TASK } from "./constants";
import SoundPlayer from "react-native-sound-player";
import { ZeroconfManager } from "./zeroconf";

const { BackgroundTaskModule } = NativeModules;
Expand Down
2 changes: 1 addition & 1 deletion app/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const HASSMIC_PORT = 11700;
export const STORAGE_KEY_UUID = "zeroconfuuid";
export const STORAGE_KEY_RUN_BACKGROUND_TASK = "bgtaskshouldrun";
export const APP_VERSION = "1.0.8.1";
export const APP_VERSION = "1.0.8.2";
22 changes: 16 additions & 6 deletions app/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ import { UUIDManager } from "./util";
import { ZeroconfManager } from "./zeroconf";
import { useState, useEffect } from "react";

import { pkgJson } from "../package.json";

// note - patched version from
// https://github.com/Romick2005/react-native-live-audio-stream
// https://github.com/jeffc/react-native-live-audio-stream
import LiveAudioStream from "react-native-live-audio-stream";

const Separator = () => (
<View
style={{
marginVertical: 8,
borderBottomColor: "#737373",
borderBottomWidth: StyleSheet.hairlineWidth,
}}
/>
);

export default function Index() {
const [hasAudioPermission, setHasAudioPermission] = useState(false);
const [hasNotificationPermission, setHasNotificationPermission] =
Expand Down Expand Up @@ -133,16 +141,18 @@ export default function Index() {
}}
>
<>
{hasAudioPermission ? null : (
<View>
<Button title="Get Permissions" onPress={requestPermissions} />
</View>
)}
<View
style={{
alignItems: "center",
justifyContent: "center",
flexDirection: "row",
}}
>
{hasAudioPermission ? null : (
<Button title="Get Permissions" onPress={requestPermissions} />
)}
<Text
style={{
fontSize: 24,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hassmic",
"main": "index.js",
"version": "1.0.8.1",
"version": "1.0.8.2",
"scripts": {
"start": "expo start",
"android": "expo run:android",
Expand Down

0 comments on commit 2427526

Please sign in to comment.