Skip to content

Commit

Permalink
1.0.30
Browse files Browse the repository at this point in the history
  • Loading branch information
niccellular committed Aug 18, 2024
1 parent 52cd895 commit 822108f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ protected MeshtasticDropDownReceiver(final MapView mapView, final Context contex
'-->
*/

/*
configBtn = mainView.findViewById(R.id.configBtn);
configBtn.setOnClickListener(v -> {
Expand All @@ -166,6 +168,7 @@ protected MeshtasticDropDownReceiver(final MapView mapView, final Context contex
throw new RuntimeException(e);
}
});
*/

// Check if user has given permission to record audio, init the model after permission is granted
int permissionCheck = ContextCompat.checkSelfPermission(mapView.getContext().getApplicationContext(), Manifest.permission.RECORD_AUDIO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public void processCotEvent(CotEvent cotEvent, String[] strings) {
Log.d(TAG, "processCotEvent");

CotDetail cotDetail = cotEvent.getDetail();
if (cotDetail.getChildren().contains("__meshtastic")) {
if (cotDetail.getChild("__meshtastic") != null) {
Log.d(TAG, "Meshtastic message, don't forward");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -834,11 +834,11 @@ else if (team.equals("DarkGreen"))
String deviceCallsign = contact.getDeviceCallsign();
String msgId = callsign + "-" + deviceCallsign + "-" + geoChat.getMessage().hashCode();

Bundle chatMessage = ChatDatabase.getInstance(_mapView.getContext()).getChatMessage(msgId);
if (chatMessage != null) {
Log.d(TAG, "Duplicate message");
return;
}
//Bundle chatMessage = ChatDatabase.getInstance(_mapView.getContext()).getChatMessage(msgId);
//if (chatMessage != null) {
// Log.d(TAG, "Duplicate message");
// return;
//}

if (prefs.getBoolean("plugin_meshtastic_voice", false)) {
StringBuilder message = new StringBuilder();
Expand Down Expand Up @@ -935,11 +935,11 @@ else if (team.equals("DarkGreen"))
String deviceCallsign = contact.getDeviceCallsign();
String msgId = callsign + "-" + deviceCallsign + "-" + geoChat.getMessage().hashCode();

Bundle chatMessage = ChatDatabase.getInstance(_mapView.getContext()).getChatMessage(msgId);
if (chatMessage != null) {
Log.d(TAG, "Duplicate message");
return;
}
//Bundle chatMessage = ChatDatabase.getInstance(_mapView.getContext()).getChatMessage(msgId);
//if (chatMessage != null) {
// Log.d(TAG, "Duplicate message");
// return;
//}

if (prefs.getBoolean("plugin_meshtastic_voice", false)) {
StringBuilder message = new StringBuilder();
Expand Down Expand Up @@ -1021,10 +1021,11 @@ public void onCotEvent(CotEvent cotEvent, Bundle bundle) {

CotDetail cotDetail = cotEvent.getDetail();

if (cotDetail.getChildren().contains("__meshtastic")) {
if (cotDetail.getChild("__meshtastic") != null) {
Log.d(TAG, "Meshtastic CoT from server");
return;
}

Log.d(TAG, "onCotEvent");
Log.d(TAG, cotEvent.toString());

Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/layout/main_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tv" />

<!--
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/configBtn"
android:text="Config" />
-->

</LinearLayout>
</ScrollView>

0 comments on commit 822108f

Please sign in to comment.