Ignore notification (#11076)
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#include "graphics/emotes.h"
|
#include "graphics/emotes.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "meshUtils.h"
|
#include "meshUtils.h"
|
||||||
|
#include "modules/CannedMessageModule.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -1073,6 +1074,7 @@ void handleNewMessage(OLEDDisplay *display, const StoredMessage &sm, const mesht
|
|||||||
{
|
{
|
||||||
if (packet.from != 0) {
|
if (packet.from != 0) {
|
||||||
hasUnreadMessage = true;
|
hasUnreadMessage = true;
|
||||||
|
const bool suppressBanner = cannedMessageModule && cannedMessageModule->isFreeTextActive();
|
||||||
|
|
||||||
// Determine if message belongs to a muted channel
|
// Determine if message belongs to a muted channel
|
||||||
bool isChannelMuted = false;
|
bool isChannelMuted = false;
|
||||||
@@ -1163,11 +1165,13 @@ void handleNewMessage(OLEDDisplay *display, const StoredMessage &sm, const mesht
|
|||||||
// Shorter banner if already in a conversation (Channel or Direct)
|
// Shorter banner if already in a conversation (Channel or Direct)
|
||||||
bool inThread = (getThreadMode() != ThreadMode::ALL);
|
bool inThread = (getThreadMode() != ThreadMode::ALL);
|
||||||
|
|
||||||
if (shouldWakeOnReceivedMessage()) {
|
if (!suppressBanner && shouldWakeOnReceivedMessage()) {
|
||||||
screen->setOn(true);
|
screen->setOn(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->showSimpleBanner(banner, inThread ? 1000 : 3000);
|
if (!suppressBanner) {
|
||||||
|
screen->showSimpleBanner(banner, inThread ? 1000 : 3000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always focus into the correct conversation thread when a message with real text arrives
|
// Always focus into the correct conversation thread when a message with real text arrives
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
|||||||
void resetSearch();
|
void resetSearch();
|
||||||
void updateDestinationSelectionList();
|
void updateDestinationSelectionList();
|
||||||
void drawDestinationSelectionScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
void drawDestinationSelectionScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||||
|
bool isFreeTextActive() const { return runState == CANNED_MESSAGE_RUN_STATE_FREETEXT; }
|
||||||
String drawWithCursor(String text, int cursor);
|
String drawWithCursor(String text, int cursor);
|
||||||
|
|
||||||
// === Emote Picker ===
|
// === Emote Picker ===
|
||||||
|
|||||||
Reference in New Issue
Block a user