mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
As of workshop RW/KB, improved / fixed text messages
Also refs #351 * messages can be formatted with style sheet * fixed: removed command from message * added originator to command line * msg parsing now in core * using ITimestampBased for text messages and status messages * allow to resize rows to content (view base) * model / views for text messages * removed old qt stylesheets
This commit is contained in:
@@ -363,15 +363,18 @@ namespace BlackCore
|
||||
{
|
||||
Q_ASSERT_X(isConnected(), "CNetworkVatlib", "Can't send to server when disconnected");
|
||||
|
||||
if (messages.isEmpty()) return;
|
||||
if (messages.isEmpty()) { return; }
|
||||
CTextMessageList privateMessages = messages.getPrivateMessages();
|
||||
privateMessages.markAsSent();
|
||||
for (const auto &message : privateMessages)
|
||||
{
|
||||
if (message.getRecipientCallsign().isEmpty()) continue;
|
||||
if (message.getRecipientCallsign().isEmpty()) { continue; }
|
||||
Vat_SendTextMessage(m_net.data(), toFSD(message.getRecipientCallsign()), toFSD(message.getMessage()));
|
||||
emit textMessageSent(message);
|
||||
}
|
||||
|
||||
CTextMessageList radioMessages = messages.getRadioMessages();
|
||||
if (radioMessages.isEmpty()) return;
|
||||
radioMessages.markAsSent();
|
||||
for (const auto &message : radioMessages)
|
||||
{
|
||||
// I could send the same message to n frequencies in one step
|
||||
@@ -380,6 +383,7 @@ namespace BlackCore
|
||||
QVector<int> freqsVec;
|
||||
freqsVec.push_back(message.getFrequency().valueRounded(CFrequencyUnit::kHz(), 0));
|
||||
Vat_SendRadioMessage(m_net.data(), freqsVec.data(), freqsVec.size(), toFSD(message.getMessage()));
|
||||
emit textMessageSent(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user