Merge pull request #650 from zjs81/feature/tester-feedback-routing-bulk-select
Tester feedback: routing, bulk select, notifications, map crash
This commit is contained in:
85 files changed
+6520
-1716
No files matched your search
@@ -122,4 +122,6 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
|
||||
// enableEdgeToEdge() for Android 15+ edge-to-edge enforcement.
|
||||
implementation("androidx.activity:activity-ktx:1.13.0")
|
||||
}
|
||||
@@ -29,7 +29,11 @@
|
||||
android:name="com.pravera.flutter_foreground_task.service.ForegroundService"
|
||||
android:exported="false"
|
||||
android:foregroundServiceType="connectedDevice"
|
||||
android:stopWithTask="false" />
|
||||
android:stopWithTask="true" />
|
||||
<!-- Monochrome small icon for the background-connection notification -->
|
||||
<meta-data
|
||||
android:name="org.meshcore.open.NOTIFICATION_ICON"
|
||||
android:resource="@drawable/ic_stat_notification" />
|
||||
<!-- Handles reply / mark-as-read actions on message notifications -->
|
||||
<receiver
|
||||
android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver"
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.meshcore.meshcore_open
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.Rect
|
||||
import android.os.Build
|
||||
import android.os.CancellationSignal
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.PixelCopy
|
||||
import android.view.ScrollCaptureCallback
|
||||
import android.view.ScrollCaptureSession
|
||||
import android.view.SurfaceView
|
||||
import android.view.TextureView
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.RequiresApi
|
||||
import io.flutter.plugin.common.BinaryMessenger
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import java.util.function.Consumer
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
/**
|
||||
* Lets Android's scrolling screenshot ("Capture more") extend past the
|
||||
* screen. Flutter draws into one surface, so the system cannot find or
|
||||
* scroll a list on its own: this callback asks Dart (ScrollCaptureService)
|
||||
* for the main scrollable's bounds, has it scroll for each requested strip,
|
||||
* and copies that strip from the Flutter surface into the capture session.
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.S)
|
||||
class FlutterScrollCapture(
|
||||
private val activity: Activity,
|
||||
messenger: BinaryMessenger,
|
||||
) : ScrollCaptureCallback {
|
||||
private val channel = MethodChannel(messenger, "meshcore_open/scroll_capture")
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
private var host: View? = null
|
||||
|
||||
/** Scroll bounds in Flutter-surface pixels. */
|
||||
private var flutterBounds = Rect()
|
||||
|
||||
fun attach(view: View) {
|
||||
host = view
|
||||
view.scrollCaptureHint = View.SCROLL_CAPTURE_HINT_INCLUDE
|
||||
view.setScrollCaptureCallback(this)
|
||||
}
|
||||
|
||||
fun detach() {
|
||||
host?.setScrollCaptureCallback(null)
|
||||
host = null
|
||||
}
|
||||
|
||||
override fun onScrollCaptureSearch(signal: CancellationSignal, onReady: Consumer<Rect>) {
|
||||
val view = host
|
||||
if (view == null) {
|
||||
onReady.accept(Rect())
|
||||
return
|
||||
}
|
||||
invoke("search", null) { result ->
|
||||
val map = result as? Map<*, *>
|
||||
val surface = findFlutterSurface(view)
|
||||
if (map == null || surface == null) {
|
||||
onReady.accept(Rect())
|
||||
return@invoke
|
||||
}
|
||||
flutterBounds = Rect(
|
||||
map.int("left"),
|
||||
map.int("top"),
|
||||
map.int("right"),
|
||||
map.int("bottom"),
|
||||
)
|
||||
// Convert to the host view's coordinates.
|
||||
val hostLoc = IntArray(2).also { view.getLocationInWindow(it) }
|
||||
val surfLoc = IntArray(2).also { surface.getLocationInWindow(it) }
|
||||
val bounds = Rect(flutterBounds)
|
||||
bounds.offset(surfLoc[0] - hostLoc[0], surfLoc[1] - hostLoc[1])
|
||||
onReady.accept(bounds)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onScrollCaptureStart(
|
||||
session: ScrollCaptureSession,
|
||||
signal: CancellationSignal,
|
||||
onReady: Runnable,
|
||||
) {
|
||||
invoke("start", null) { onReady.run() }
|
||||
}
|
||||
|
||||
override fun onScrollCaptureImageRequest(
|
||||
session: ScrollCaptureSession,
|
||||
signal: CancellationSignal,
|
||||
captureArea: Rect,
|
||||
onComplete: Consumer<Rect>,
|
||||
) {
|
||||
val args = mapOf("top" to captureArea.top, "bottom" to captureArea.bottom)
|
||||
invoke("scroll", args) { result ->
|
||||
val scrolled = ((result as? Number)?.toDouble() ?: 0.0).roundToInt()
|
||||
// The part of the requested strip now on screen, in scroll-bounds
|
||||
// coordinates relative to the current scroll position.
|
||||
val visibleTop = max(captureArea.top - scrolled, 0)
|
||||
val visibleBottom = min(captureArea.bottom - scrolled, flutterBounds.height())
|
||||
val left = max(captureArea.left, 0)
|
||||
val right = min(captureArea.right, flutterBounds.width())
|
||||
if (visibleBottom <= visibleTop || right <= left || signal.isCanceled) {
|
||||
onComplete.accept(Rect())
|
||||
return@invoke
|
||||
}
|
||||
val source = Rect(
|
||||
flutterBounds.left + left,
|
||||
flutterBounds.top + visibleTop,
|
||||
flutterBounds.left + right,
|
||||
flutterBounds.top + visibleBottom,
|
||||
)
|
||||
val captured = Rect(left, visibleTop + scrolled, right, visibleBottom + scrolled)
|
||||
// Give the raster thread a moment to present the scrolled frame.
|
||||
handler.postDelayed({
|
||||
copyPixels(source) { bitmap ->
|
||||
if (bitmap == null || signal.isCanceled) {
|
||||
onComplete.accept(Rect())
|
||||
return@copyPixels
|
||||
}
|
||||
try {
|
||||
val canvas = session.surface.lockHardwareCanvas()
|
||||
try {
|
||||
canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR)
|
||||
canvas.drawBitmap(bitmap, 0f, 0f, null)
|
||||
} finally {
|
||||
session.surface.unlockCanvasAndPost(canvas)
|
||||
}
|
||||
onComplete.accept(captured)
|
||||
} catch (e: Exception) {
|
||||
onComplete.accept(Rect())
|
||||
} finally {
|
||||
bitmap.recycle()
|
||||
}
|
||||
}
|
||||
}, FRAME_SETTLE_MS)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onScrollCaptureEnd(onReady: Runnable) {
|
||||
invoke("end", null) { onReady.run() }
|
||||
}
|
||||
|
||||
private fun copyPixels(source: Rect, done: (Bitmap?) -> Unit) {
|
||||
val view = host
|
||||
val surface = view?.let { findFlutterSurface(it) }
|
||||
val bitmap = Bitmap.createBitmap(source.width(), source.height(), Bitmap.Config.ARGB_8888)
|
||||
when (surface) {
|
||||
is SurfaceView -> PixelCopy.request(surface, source, bitmap, { code ->
|
||||
if (code == PixelCopy.SUCCESS) {
|
||||
done(bitmap)
|
||||
} else {
|
||||
bitmap.recycle()
|
||||
done(null)
|
||||
}
|
||||
}, handler)
|
||||
is TextureView -> {
|
||||
val full = surface.bitmap
|
||||
if (full == null) {
|
||||
bitmap.recycle()
|
||||
done(null)
|
||||
} else {
|
||||
android.graphics.Canvas(bitmap).drawBitmap(
|
||||
full,
|
||||
source,
|
||||
Rect(0, 0, source.width(), source.height()),
|
||||
null,
|
||||
)
|
||||
full.recycle()
|
||||
done(bitmap)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
bitmap.recycle()
|
||||
done(null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** The view Flutter renders into (SurfaceView by default). */
|
||||
private fun findFlutterSurface(view: View): View? {
|
||||
if (view is SurfaceView || view is TextureView) return view
|
||||
if (view is ViewGroup) {
|
||||
for (i in 0 until view.childCount) {
|
||||
findFlutterSurface(view.getChildAt(i))?.let { return it }
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
private fun invoke(method: String, args: Any?, onResult: (Any?) -> Unit) {
|
||||
if (activity.isFinishing) {
|
||||
onResult(null)
|
||||
return
|
||||
}
|
||||
channel.invokeMethod(method, args, object : MethodChannel.Result {
|
||||
override fun success(result: Any?) = onResult(result)
|
||||
override fun error(code: String, message: String?, details: Any?) = onResult(null)
|
||||
override fun notImplemented() = onResult(null)
|
||||
})
|
||||
}
|
||||
|
||||
private fun Map<*, *>.int(key: String): Int = (this[key] as? Number)?.toInt() ?: 0
|
||||
|
||||
private companion object {
|
||||
const val FRAME_SETTLE_MS = 48L
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,39 @@
|
||||
package com.meshcore.meshcore_open
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
|
||||
class MainActivity : FlutterActivity() {
|
||||
// FlutterFragmentActivity (a ComponentActivity) so enableEdgeToEdge() works:
|
||||
// Android 15+ enforces edge-to-edge for apps targeting SDK 35, and the app
|
||||
// already draws behind the system bars and handles insets in Flutter.
|
||||
class MainActivity : FlutterFragmentActivity() {
|
||||
private val usbFunctions by lazy { MeshcoreUsbFunctions(this) }
|
||||
private var scrollCapture: FlutterScrollCapture? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
enableEdgeToEdge()
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
usbFunctions.configureFlutterEngine(flutterEngine)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
scrollCapture?.detach()
|
||||
scrollCapture = FlutterScrollCapture(
|
||||
this,
|
||||
flutterEngine.dartExecutor.binaryMessenger,
|
||||
).also { it.attach(findViewById<View>(android.R.id.content)) }
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
scrollCapture?.detach()
|
||||
scrollCapture = null
|
||||
usbFunctions.dispose()
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.hardware.usb.UsbManager
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import android.app.Activity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugin.common.EventChannel
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
@@ -24,7 +24,7 @@ import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
class MeshcoreUsbFunctions(
|
||||
private val activity: FlutterActivity,
|
||||
private val activity: Activity,
|
||||
) {
|
||||
private companion object {
|
||||
const val usbRecipientInterface = 0x01
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Monochrome status-bar icon (chat bubble with radio tower). Android only
|
||||
uses the alpha channel for small notification icons, so this must stay
|
||||
white-on-transparent; the full-colour launcher icon renders as a blob. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="1.8"
|
||||
android:strokeLineJoin="round"
|
||||
android:pathData="M12,3C6.75,3 2.5,6.58 2.5,11c0,2.28 1.13,4.34 2.95,5.8L4.5,21l4.36,-2.38C9.84,18.87 10.9,19 12,19c5.25,0 9.5,-3.58 9.5,-8S17.25,3 12,3z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="1.6"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M8,10A5,5 0,0 1,16 10" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="1.6"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M9.78,11.3A2.8,2.8 0,0 1,14.22 11.3" />
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12,12.4L14.1,17L9.9,17z" />
|
||||
</vector>
|
||||
@@ -149,16 +149,15 @@ A full-screen informational page explaining that the web client requires Chrome.
|
||||
### What It Does (Background Service)
|
||||
Maintains an in-memory LRU cache of up to 50 contacts, each with up to 100 route history entries, tracking:
|
||||
- Hop count and trip time
|
||||
- Success/failure counts and route weights
|
||||
- Success/failure counts (lifetime and faded)
|
||||
- Flood vs. direct discovery
|
||||
|
||||
### Path Scoring
|
||||
Paths are scored using a weighted formula: reliability (45%), route weight (20%), latency (25%), and freshness (10%). These weights are internal and not user-configurable. Paths whose weight drops to zero or below are automatically deleted. Flood deliveries that receive an ACK give a weight boost (+0.5) to the specific return path.
|
||||
Each route keeps delivery and failure counts that fade over time (half their weight per day, at most 16 recent results). For each send attempt a route is chosen by Thompson sampling over those counts, adjusted slightly for speed and for what the radio currently hears. There are no user-tunable weights. A route is deleted only when it keeps failing and hasn't delivered for a week. Flood deliveries that receive an ACK credit the specific return path. Details: [Auto route selection](routing-paths.md#auto-route-selection).
|
||||
|
||||
Used internally for:
|
||||
- **Auto route rotation**: Cycles through known paths using configurable weights on retries, with a diversity window to avoid re-using recently tried paths
|
||||
- **Path selection**: Picks the best-scored path for each retry attempt
|
||||
- **Flood statistics**: Tracks flood vs. direct discovery ratios
|
||||
- **Auto route rotation**: Picks a route for each attempt; retries usually move to a different route, and the last attempt floods
|
||||
- **Flood statistics**: Tracks flood deliveries and failures
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Routing Paths
|
||||
|
||||
MeshCore Open supports flood routing, direct paths, and routing overrides. Chat → Routing lets you choose Auto, Flood, or Manual and inspect recent paths. [Regions](regions.md) control the scope of channel floods; they do not replace direct-contact routing.
|
||||
MeshCore Open supports flood routing, direct paths, and routing overrides. Chat → Routing lets you choose Auto, Flood, Direct (always zero hops), or Manual and inspect recent paths. [Regions](regions.md) control the scope of channel floods; they do not replace direct-contact routing.
|
||||
|
||||
## Hash widths and firmware capability
|
||||
|
||||
@@ -45,6 +45,21 @@ Short prefixes can match several known nodes. An unresolved or ambiguous hop is
|
||||
|
||||
## Storage and route selection
|
||||
|
||||
Contacts/messages persist hop count, path bytes, and width. Legacy contact records without width infer it from consistent hop and byte counts, falling back to one byte. `PathHistoryService` scores recent routes using delivery observations; automatic route rotation can select another route on retry when no manual override is active. Rotation follows the App Settings **Auto Route Rotation** toggle (`autoRouteRotationEnabled`, on by default).
|
||||
Contacts/messages persist hop count, path bytes, and width. Legacy contact records without width infer it from consistent hop and byte counts, falling back to one byte. Automatic route selection applies when no override is set and follows the App Settings **Auto Route Rotation** toggle (`autoRouteRotationEnabled`, on by default).
|
||||
|
||||
## Auto route selection
|
||||
|
||||
`PathHistoryService.selectPathForAttempt` picks the route for each send attempt; the logic lives in `lib/services/route_chooser.dart`.
|
||||
|
||||
- **Known routes** come from the radio's learned path, every attempt's delivery result, and floods that got through (crediting the route the reply came back on). The direct route — zero hops, no path bytes — is a normal candidate.
|
||||
- **Faded stats:** each route keeps delivery and failure counts that lose half their weight every 24 hours (`routeStatsHalfLife`), so recent behaviour outweighs old.
|
||||
- **Thompson sampling:** for each attempt, a plausible delivery rate is drawn for every route from its faded counts and the best draw wins. Proven routes win most of the time; untested or recovering routes are still tried occasionally. Speed adjusts the score slightly.
|
||||
- **Context:** `MeshCoreConnector.routeContextFor` reports what the radio heard in the last two hours (advertisers heard directly and the last hop of relayed adverts). Routes whose first hop was heard — or the direct route, when the contact itself was heard directly — score higher; routes that don't fit score lower. Not hearing a repeater is weak evidence, so nothing is excluded. With nothing heard, context has no effect.
|
||||
- **Retries** halve the score of routes already tried for the same message, so they usually try something different without wasting an attempt on a much weaker route. The final attempt always floods.
|
||||
- **Offline contacts:** `MessageRetryService` holds a message's route failures until its fate is known. If any attempt is acknowledged, the routes that timed out are blamed; if nothing gets through, the contact was probably unreachable and no route is blamed.
|
||||
- **Forgetting:** a failing route is deleted only after it hasn't delivered for a week, so a repeater that is down for a day is still known when it returns.
|
||||
- Route picks and their results are written to the app debug log under the `Routing` tag.
|
||||
|
||||
`resolvePathSelection` uses a route picked from history even when the radio itself holds no path for the contact, so repeater logins and commands use proven routes instead of flooding.
|
||||
|
||||
For message-path actions, trace maps, and retry behavior, see [chat](chat-and-messaging.md), [channels](channels.md), and [map](map-and-location.md).
|
||||
@@ -122,13 +122,9 @@ Individual channels can be muted from the channel chat bell icon, the channel li
|
||||
- **Clear Path on Max Retry**: Erases the stored routing path after all retries fail
|
||||
- **Jump to Oldest Unread**: When opening a chat, scrolls to the oldest unread message instead of the newest
|
||||
- **Auto-fetch Repeater Settings** (off by default): Requests every setting when a repeater's settings screen opens. Each setting is a separate request over LoRa, so this is slow and uses airtime; when off, use Refresh All or the per-setting refresh buttons. See [Repeater Settings](repeater-management.md#repeater-settings)
|
||||
- **Auto Route Rotation**: Enables weighted routing algorithm. When enabled, expands to show five slider sub-settings (hidden when off) and a Reset button:
|
||||
- Max Route Weight (1–10, default 5, integer steps)
|
||||
- Initial Route Weight (0.5–5.0, default 3.0)
|
||||
- Success Increment (0.1–2.0, default 0.5, 0.1 steps)
|
||||
- Failure Decrement (0.1–2.0, default 0.2, 0.1 steps)
|
||||
- **Auto Route Rotation**: Lets the app choose each message's route from the routes that have worked for that contact (see [Auto route selection](routing-paths.md#auto-route-selection)). When enabled, it expands (hidden when off) to show:
|
||||
- Max Message Retries (2–10, default 5)
|
||||
- **Reset Routing Algorithm to Default**: Restores all five routing algorithm settings to their factory default values
|
||||
- **Reset Routing Algorithm to Default**: Restores the routing settings to their factory defaults
|
||||
- **Enable Message Tracing**: Shows path trace overlays and extra metadata on messages
|
||||
- **Region next to hop count** (default off): Shows a channel message's region chip on the same line as its hop count instead of below it
|
||||
- **Resend channel messages until they travel far enough** (default off): If your channel message isn't heard coming back through enough repeaters, it's sent again. Uses more airtime. When on, it shows:
|
||||
|
||||
@@ -324,6 +324,20 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
double? _selfLatitude;
|
||||
double? _selfLongitude;
|
||||
final List<DirectRepeater> _directRepeaters = List.empty(growable: true);
|
||||
|
||||
/// Nodes heard with no repeater in between — advertisers heard directly
|
||||
/// and the last hop of relayed adverts — for auto routing's [RouteContext].
|
||||
/// Kept longer and wider than [_directRepeaters] (which is capped at the
|
||||
/// five strongest for display).
|
||||
static const Duration _heardNeighbourWindow = Duration(hours: 2);
|
||||
static const int _maxHeardNeighbours = 128;
|
||||
final List<({List<int> prefix, DateTime at})> _heardNeighbours = [];
|
||||
|
||||
/// When each contact was last heard with no repeater in between.
|
||||
final Map<String, DateTime> _heardDirectAt = {};
|
||||
|
||||
/// Radio the heard-neighbour observations above belong to.
|
||||
String? _heardNeighboursRadioKey;
|
||||
bool _isLoadingContacts = false;
|
||||
DateTime? _contactSyncRequestedAt;
|
||||
bool _hasLoadedContacts = false;
|
||||
@@ -1052,16 +1066,42 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
return _channelMessages[_canonicalSlot(channel.index)] ?? [];
|
||||
}
|
||||
|
||||
Future<void> deleteChannelMessage(ChannelMessage message) async {
|
||||
final channelIndex = message.channelIndex;
|
||||
if (channelIndex == null) return;
|
||||
final slot = _canonicalSlot(channelIndex);
|
||||
final messages = _channelMessages[slot];
|
||||
if (messages == null) return;
|
||||
final removed = messages.remove(message);
|
||||
if (!removed) return;
|
||||
await _saveChannelMessages(slot, messages);
|
||||
Future<void> deleteChannelMessage(ChannelMessage message) =>
|
||||
deleteChannelMessages([message]);
|
||||
|
||||
/// Deletes channel messages, saving each affected channel once. Returns how
|
||||
/// many were removed.
|
||||
///
|
||||
/// Matches by message id, not object identity: a repeat heard while a
|
||||
/// confirmation dialog was open replaces the stored object (new path,
|
||||
/// reactions), and identity matching would then silently delete nothing.
|
||||
Future<int> deleteChannelMessages(Iterable<ChannelMessage> messages) async {
|
||||
final idsBySlot = <int, Set<String>>{};
|
||||
for (final message in messages) {
|
||||
final channelIndex = message.channelIndex;
|
||||
if (channelIndex == null) continue;
|
||||
idsBySlot
|
||||
.putIfAbsent(_canonicalSlot(channelIndex), () => <String>{})
|
||||
.add(message.messageId);
|
||||
}
|
||||
var removed = 0;
|
||||
final touched = <int>[];
|
||||
for (final MapEntry(key: slot, value: ids) in idsBySlot.entries) {
|
||||
final stored = _channelMessages[slot];
|
||||
if (stored == null) continue;
|
||||
final before = stored.length;
|
||||
stored.removeWhere((m) => ids.contains(m.messageId));
|
||||
if (stored.length != before) {
|
||||
removed += before - stored.length;
|
||||
touched.add(slot);
|
||||
}
|
||||
}
|
||||
if (touched.isEmpty) return 0;
|
||||
for (final slot in touched) {
|
||||
await _saveChannelMessages(slot, _channelMessages[slot]!);
|
||||
}
|
||||
notifyListeners();
|
||||
return removed;
|
||||
}
|
||||
|
||||
// ---- message filter -------------------------------------------------------
|
||||
@@ -1248,21 +1288,29 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
Future<void> markChannelMessageSpam(
|
||||
Channel channel,
|
||||
ChannelMessage message,
|
||||
) => markChannelMessagesSpam([(channel, message)]);
|
||||
|
||||
/// Bulk "Spam": hides every message and teaches the filter once.
|
||||
Future<void> markChannelMessagesSpam(
|
||||
List<(Channel channel, ChannelMessage message)> items,
|
||||
) async {
|
||||
_updateLoadedChannelMessageById(
|
||||
channel,
|
||||
message.messageId,
|
||||
(existing) => existing
|
||||
.copyWith(clearFilter: true)
|
||||
.copyWith(filterReason: filterReasonToJson(FilterReason.manual)),
|
||||
);
|
||||
if (items.isEmpty) return;
|
||||
for (final (channel, message) in items) {
|
||||
_updateLoadedChannelMessageById(
|
||||
channel,
|
||||
message.messageId,
|
||||
(existing) => existing
|
||||
.copyWith(clearFilter: true)
|
||||
.copyWith(filterReason: filterReasonToJson(FilterReason.manual)),
|
||||
);
|
||||
}
|
||||
notifyListeners();
|
||||
// Same text intake saw (reply mention stripped), so the spam example
|
||||
// replaces the clean one recorded on arrival instead of contradicting it.
|
||||
await _messageFilterService?.markSpam(
|
||||
sender: message.senderName,
|
||||
text: _messageFilterText(message),
|
||||
);
|
||||
await _messageFilterService?.markSpamMany([
|
||||
for (final (_, message) in items)
|
||||
(sender: message.senderName, text: _messageFilterText(message)),
|
||||
]);
|
||||
}
|
||||
|
||||
/// User marked [message] in [channel] as not spam: show it again and teach
|
||||
@@ -1270,20 +1318,31 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
Future<void> markChannelMessageNotSpam(
|
||||
Channel channel,
|
||||
ChannelMessage message,
|
||||
) => markChannelMessagesNotSpam([(channel, message)]);
|
||||
|
||||
/// Bulk "Not spam": shows every message again and teaches the filter once.
|
||||
Future<void> markChannelMessagesNotSpam(
|
||||
List<(Channel channel, ChannelMessage message)> items,
|
||||
) async {
|
||||
_updateLoadedChannelMessageById(
|
||||
channel,
|
||||
message.messageId,
|
||||
(existing) => existing.copyWith(clearFilter: true),
|
||||
);
|
||||
if (items.isEmpty) return;
|
||||
for (final (channel, message) in items) {
|
||||
_updateLoadedChannelMessageById(
|
||||
channel,
|
||||
message.messageId,
|
||||
(existing) => existing.copyWith(clearFilter: true),
|
||||
);
|
||||
}
|
||||
notifyListeners();
|
||||
final service = _messageFilterService;
|
||||
if (service == null) return;
|
||||
await service.markNotSpam(
|
||||
channelId: messageFilterChannelId(channel),
|
||||
sender: message.senderName,
|
||||
text: _messageFilterText(message),
|
||||
);
|
||||
await service.markNotSpamMany([
|
||||
for (final (channel, message) in items)
|
||||
(
|
||||
channelId: messageFilterChannelId(channel),
|
||||
sender: message.senderName,
|
||||
text: _messageFilterText(message),
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
/// Filtered messages across all loaded channels, newest first.
|
||||
@@ -1588,6 +1647,12 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
_recalculateCachedChannelsUnreadTotal();
|
||||
}
|
||||
|
||||
/// Contact whose chat is on screen, if any.
|
||||
String? get activeContactKey => _activeContactKey;
|
||||
|
||||
/// Channel whose chat is on screen, if any.
|
||||
int? get activeChannelIndex => _activeChannelIndex;
|
||||
|
||||
void setActiveContact(String? contactKeyHex) {
|
||||
if (contactKeyHex != null &&
|
||||
!_shouldTrackUnreadForContactKey(contactKeyHex)) {
|
||||
@@ -2066,6 +2131,8 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
|
||||
// Initialize notification service
|
||||
_notificationService.initialize();
|
||||
_notificationService.isBulkSyncActive = () => isSyncingQueuedMessages;
|
||||
_notificationService.unreadTotalProvider = getTotalUnreadCount;
|
||||
_notificationReplySubscription ??= _notificationService.replies.listen(
|
||||
(reply) => unawaited(
|
||||
handleNotificationReply(reply).catchError((Object e) {
|
||||
@@ -2496,6 +2563,15 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
static String _describeRoute(PathSelection selection) {
|
||||
if (selection.useFlood) return 'flood';
|
||||
if (selection.hopCount == 0) return 'direct';
|
||||
final hex = selection.pathBytes
|
||||
.map((b) => b.toRadixString(16).padLeft(2, '0'))
|
||||
.join();
|
||||
return '${selection.hopCount} hops [$hex]';
|
||||
}
|
||||
|
||||
void _recordPathResult(
|
||||
String contactPubKeyHex,
|
||||
PathSelection selection,
|
||||
@@ -2503,6 +2579,12 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
int? tripTimeMs,
|
||||
) {
|
||||
if (_pathHistoryService == null) return;
|
||||
_appDebugLogService?.info(
|
||||
'Route result for ${getContactByPubKeyHex(contactPubKeyHex)?.name ?? contactPubKeyHex.substring(0, 8)}: '
|
||||
'${_describeRoute(selection)} ${success ? 'delivered' : 'failed'}'
|
||||
'${tripTimeMs != null ? ' in ${tripTimeMs}ms' : ''}',
|
||||
tag: 'Routing',
|
||||
);
|
||||
final settings = _appSettingsService?.settings;
|
||||
_pathHistoryService!.recordPathResult(
|
||||
contactPubKeyHex,
|
||||
@@ -2522,9 +2604,10 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
(c) => c?.publicKeyHex == contactPubKeyHex,
|
||||
orElse: () => null,
|
||||
);
|
||||
// pathLength 0 with no bytes is the direct path: credit it too.
|
||||
if (contact != null &&
|
||||
contact.pathLength >= 0 &&
|
||||
contact.path.isNotEmpty) {
|
||||
(contact.path.isNotEmpty || contact.pathLength == 0)) {
|
||||
_pathHistoryService!.recordFloodPathAttribution(
|
||||
contactPubKeyHex: contactPubKeyHex,
|
||||
pathBytes: contact.path,
|
||||
@@ -2556,14 +2639,26 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
return null;
|
||||
}
|
||||
|
||||
final contact = getContactByPubKeyHex(contactPubKeyHex);
|
||||
final routeContext = routeContextFor(contact);
|
||||
final selection = _pathHistoryService?.selectPathForAttempt(
|
||||
contactPubKeyHex,
|
||||
attemptIndex: attemptIndex,
|
||||
maxRetries: maxRetries,
|
||||
recentSelections: recentSelections,
|
||||
context: routeContext,
|
||||
);
|
||||
if (selection != null) {
|
||||
_pathHistoryService?.recordPathAttempt(contactPubKeyHex, selection);
|
||||
// Logged so route choices and their outcomes can be compared from the
|
||||
// app debug log on a live mesh.
|
||||
_appDebugLogService?.info(
|
||||
'Route pick for ${contact?.name ?? contactPubKeyHex.substring(0, 8)}: '
|
||||
'attempt ${attemptIndex + 1}/$maxRetries → ${_describeRoute(selection)} '
|
||||
'(heard nearby: ${routeContext.hasNeighbourInfo}, '
|
||||
'contact heard direct: ${routeContext.contactHeardDirectly})',
|
||||
tag: 'Routing',
|
||||
);
|
||||
}
|
||||
return selection;
|
||||
}
|
||||
@@ -4410,6 +4505,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
if (_pathHashByteWidth != nextWidth) {
|
||||
_pathHashByteWidth = nextWidth;
|
||||
_directRepeaters.clear();
|
||||
_heardNeighbours.clear();
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
@@ -6252,6 +6348,13 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
|
||||
/// Forgets everything held in memory for [slot], whose channel changed.
|
||||
void _dropChannelSlotState(int slot, String? previousId) {
|
||||
// A notification for the old channel would open the new one.
|
||||
unawaited(
|
||||
_notificationService.clearChannelNotification(
|
||||
slot,
|
||||
getTotalUnreadCount(),
|
||||
),
|
||||
);
|
||||
_channelMessages.remove(slot);
|
||||
_processedChannelReactions.remove(slot);
|
||||
_channelSmazEnabled.remove(slot);
|
||||
@@ -6792,6 +6895,13 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
_unreadStore.setPublicKeyHex = selfPublicKeyHex;
|
||||
_discoveryContactStore.setPublicKeyHex = selfPublicKeyHex;
|
||||
_pathHistoryService?.setDevicePublicKey(selfPublicKeyHex);
|
||||
// What one radio hears says nothing about another's surroundings.
|
||||
if (_heardNeighboursRadioKey != selfPublicKeyHex) {
|
||||
_heardNeighbours.clear();
|
||||
_heardDirectAt.clear();
|
||||
_heardNeighboursRadioKey = selfPublicKeyHex;
|
||||
}
|
||||
unawaited(_notificationService.bindRadio(selfPublicKeyHex));
|
||||
|
||||
// Now that we have self info, we can load all the persisted data for this node
|
||||
loadContactCache();
|
||||
@@ -6854,6 +6964,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
}
|
||||
if (_pathHashByteWidth != previousPathHashByteWidth) {
|
||||
_directRepeaters.clear();
|
||||
_heardNeighbours.clear();
|
||||
}
|
||||
|
||||
// Firmware reports MAX_CONTACTS / 2 for v3+ device info.
|
||||
@@ -9652,6 +9763,66 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
/// Records who was heard with no repeater in between for this advert.
|
||||
void _noteHeardNeighbour(Contact contact, Uint8List path, int hashWidth) {
|
||||
final now = DateTime.now();
|
||||
final List<int> prefix;
|
||||
if (path.isEmpty) {
|
||||
_heardDirectAt[contact.publicKeyHex] = now;
|
||||
prefix = contact.publicKey.sublist(
|
||||
0,
|
||||
math.min(4, contact.publicKey.length),
|
||||
);
|
||||
} else if (path.length >= hashWidth) {
|
||||
// Advert paths run from the originator toward us: the last hop is the
|
||||
// node we heard.
|
||||
prefix = path.sublist(path.length - hashWidth);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
_heardNeighbours
|
||||
..removeWhere(
|
||||
(n) =>
|
||||
listEquals(n.prefix, prefix) ||
|
||||
now.difference(n.at) > _heardNeighbourWindow,
|
||||
)
|
||||
..add((prefix: List<int>.unmodifiable(prefix), at: now));
|
||||
if (_heardNeighbours.length > _maxHeardNeighbours) {
|
||||
_heardNeighbours.removeAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
/// What the radio hears right now, for choosing a route to [contact].
|
||||
RouteContext routeContextFor(Contact? contact) {
|
||||
final now = DateTime.now();
|
||||
_heardNeighbours.removeWhere(
|
||||
(n) => now.difference(n.at) > _heardNeighbourWindow,
|
||||
);
|
||||
final neighbours = List.of(_heardNeighbours);
|
||||
final heardDirectAt = contact == null
|
||||
? null
|
||||
: _heardDirectAt[contact.publicKeyHex];
|
||||
return RouteContext(
|
||||
hasNeighbourInfo: neighbours.isNotEmpty,
|
||||
contactHeardDirectly:
|
||||
heardDirectAt != null &&
|
||||
now.difference(heardDirectAt) <= _heardNeighbourWindow,
|
||||
firstHopHeard: (pathBytes, hashWidth) {
|
||||
final width = hashWidth.clamp(1, 4);
|
||||
if (pathBytes.length < width) return false;
|
||||
final hop = pathBytes.sublist(0, width);
|
||||
return neighbours.any(
|
||||
(n) =>
|
||||
n.prefix.length >= width &&
|
||||
listEquals(n.prefix.sublist(0, width), hop),
|
||||
);
|
||||
},
|
||||
radioPath: contact != null && contact.pathLength >= 0
|
||||
? contact.path
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
void _updateDirectRepeater(
|
||||
Contact contact,
|
||||
double snr,
|
||||
@@ -9659,6 +9830,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
required int pathHashWidth,
|
||||
}) {
|
||||
final hashWidth = pathHashWidth.clamp(1, 4).toInt();
|
||||
_noteHeardNeighbour(contact, path, hashWidth);
|
||||
if (path.isNotEmpty && path.length < hashWidth) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// Scrolls a lazily built chat list until the row at [targetIndex] is built,
|
||||
/// then animates it to the middle of the viewport. Returns whether it got
|
||||
/// there.
|
||||
///
|
||||
/// A `ListView.builder` only builds rows near the viewport and only estimates
|
||||
/// the extent of the rest, so a target far away has no widget yet. This jumps
|
||||
/// to a proportional estimate, then reads which rows the list actually built
|
||||
/// and steps toward the target until it is among them. Works for reversed
|
||||
/// chat lists too: it only compares list indices, never pixel directions.
|
||||
Future<bool> scrollListToIndex({
|
||||
required ScrollController controller,
|
||||
required int targetIndex,
|
||||
required int itemCount,
|
||||
required bool Function() isMounted,
|
||||
}) async {
|
||||
if (!controller.hasClients || itemCount <= 0) return false;
|
||||
if (targetIndex < 0 || targetIndex >= itemCount) return false;
|
||||
|
||||
// First guess: the target's share of the estimated extent.
|
||||
final start = controller.position;
|
||||
final guess = start.maxScrollExtent * ((targetIndex + 0.5) / itemCount);
|
||||
controller.jumpTo(guess.clamp(start.minScrollExtent, start.maxScrollExtent));
|
||||
|
||||
var pinnedFrames = 0;
|
||||
for (var attempt = 0; attempt < 120; attempt++) {
|
||||
await WidgetsBinding.instance.endOfFrame;
|
||||
if (!isMounted() || !controller.hasClients) return false;
|
||||
final position = controller.position;
|
||||
final sliver = _findListSliver(position);
|
||||
if (sliver == null) return false;
|
||||
|
||||
final child = _childAt(sliver, targetIndex);
|
||||
if (child != null) {
|
||||
final viewport = RenderAbstractViewport.maybeOf(child);
|
||||
if (viewport == null) return false;
|
||||
final reveal = viewport.getOffsetToReveal(child, 0.5).offset;
|
||||
await controller.animateTo(
|
||||
reveal.clamp(position.minScrollExtent, position.maxScrollExtent),
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
final first = sliver.firstChild;
|
||||
final last = sliver.lastChild;
|
||||
if (first == null || last == null) return false;
|
||||
final lowest = sliver.indexOf(first);
|
||||
final highest = sliver.indexOf(last);
|
||||
// Step by the rows still to go times the measured height of the rows
|
||||
// built around here, so the walk converges even when distant rows are
|
||||
// much taller or shorter than the ones the extent estimate was based on.
|
||||
// Larger indices sit further along the scroll axis.
|
||||
final rowsToGo = targetIndex > highest
|
||||
? targetIndex - highest
|
||||
: targetIndex < lowest
|
||||
? targetIndex - lowest
|
||||
: 0;
|
||||
final step = rowsToGo == 0
|
||||
? 0.0
|
||||
: rowsToGo * _averageExtent(sliver, position.axis) +
|
||||
rowsToGo.sign * position.viewportDimension * 0.5;
|
||||
final next = position.pixels + step;
|
||||
final clamped = next.clamp(
|
||||
position.minScrollExtent,
|
||||
position.maxScrollExtent,
|
||||
);
|
||||
if (clamped == position.pixels) {
|
||||
// Pinned at an end with the target still beyond it. The extent is an
|
||||
// estimate that grows as rows get built, so only give up once it has
|
||||
// stopped growing for a few frames. Otherwise wait a frame for layout.
|
||||
if (next != clamped && ++pinnedFrames >= 3) return false;
|
||||
continue;
|
||||
}
|
||||
pinnedFrames = 0;
|
||||
controller.jumpTo(clamped);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Mean main-axis size of the rows [sliver] has built.
|
||||
double _averageExtent(RenderSliverMultiBoxAdaptor sliver, Axis axis) {
|
||||
var total = 0.0;
|
||||
var count = 0;
|
||||
var child = sliver.firstChild;
|
||||
while (child != null) {
|
||||
if (child.hasSize) {
|
||||
total += axis == Axis.vertical ? child.size.height : child.size.width;
|
||||
count++;
|
||||
}
|
||||
child = sliver.childAfter(child);
|
||||
}
|
||||
return count == 0 ? 50 : total / count;
|
||||
}
|
||||
|
||||
RenderBox? _childAt(RenderSliverMultiBoxAdaptor sliver, int index) {
|
||||
var child = sliver.firstChild;
|
||||
while (child != null) {
|
||||
if (sliver.indexOf(child) == index) return child;
|
||||
child = sliver.childAfter(child);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The list sliver inside the scrollable that [position] belongs to.
|
||||
RenderSliverMultiBoxAdaptor? _findListSliver(ScrollPosition position) {
|
||||
final context = position.context.storageContext;
|
||||
if (context is! Element) return null;
|
||||
RenderSliverMultiBoxAdaptor? found;
|
||||
void visit(Element element) {
|
||||
if (found != null) return;
|
||||
final renderObject = element is RenderObjectElement
|
||||
? element.renderObject
|
||||
: null;
|
||||
if (renderObject is RenderSliverMultiBoxAdaptor) {
|
||||
found = renderObject;
|
||||
return;
|
||||
}
|
||||
element.visitChildren(visit);
|
||||
}
|
||||
|
||||
context.visitChildren(visit);
|
||||
return found;
|
||||
}
|
||||
@@ -28,7 +28,9 @@ String shortContactKey(String hex) => hex.length <= 12
|
||||
: '${hex.substring(0, 6)}...${hex.substring(hex.length - 6)}';
|
||||
|
||||
const int _keyBytes = 32;
|
||||
final RegExp _tokenPattern = RegExp(r'^<([0-9a-fA-F]{64}):([1-4]):([^>]*)>$');
|
||||
const String _tokenBody = r'<([0-9a-fA-F]{64}):([1-4]):([^<>\r\n]*)>';
|
||||
final RegExp _tokenPattern = RegExp('^$_tokenBody\$');
|
||||
final RegExp _embeddedTokenPattern = RegExp(_tokenBody);
|
||||
|
||||
/// Builds the share token for a contact. [publicKey] must be 32 bytes.
|
||||
String encodeContactShare({
|
||||
@@ -46,8 +48,15 @@ String encodeContactShare({
|
||||
}
|
||||
|
||||
/// Returns null unless the whole trimmed [text] is a valid share token.
|
||||
ContactShare? parseContactShare(String text) {
|
||||
final match = _tokenPattern.firstMatch(text.trim());
|
||||
ContactShare? parseContactShare(String text) =>
|
||||
_shareFromMatch(_tokenPattern.firstMatch(text.trim()));
|
||||
|
||||
/// Finds a share token anywhere in [text], e.g. a copied chat message that
|
||||
/// also carries a sender prefix (`Name: <...>`) or surrounding words.
|
||||
ContactShare? findContactShare(String text) =>
|
||||
_shareFromMatch(_embeddedTokenPattern.firstMatch(text));
|
||||
|
||||
ContactShare? _shareFromMatch(RegExpMatch? match) {
|
||||
if (match == null) return null;
|
||||
final hex = match.group(1)!.toLowerCase();
|
||||
final bytes = Uint8List(_keyBytes);
|
||||
|
||||
+51
-9
@@ -2233,14 +2233,6 @@
|
||||
"contact_teleLocSubtitle": "Позволи споделяне на данни за местоположение",
|
||||
"contact_teleLoc": "Местоположение на телеметрията",
|
||||
"contact_teleEnvSubtitle": "Позволи споделяне на данни от средносферните датчици",
|
||||
"appSettings_initialRouteWeight": "Първоначална тежест на маршрута",
|
||||
"appSettings_maxRouteWeight": "Максимално допустимо тегло на маршрута",
|
||||
"appSettings_initialRouteWeightSubtitle": "Начално тегло за новооткрити маршрути",
|
||||
"appSettings_maxRouteWeightSubtitle": "Максималното тегло, което един маршрут може да събере от успешни доставки.",
|
||||
"appSettings_routeWeightSuccessIncrement": "Увеличение на теглото за успех",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Тегло, добавено към път след успешно доставяне.",
|
||||
"appSettings_routeWeightFailureDecrement": "Намаляване на теглото, свързано с неуспех",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Тегло, което е било премахнато от пътя след неуспешен опит за доставка.",
|
||||
"appSettings_maxMessageRetries": "Максимален брой опити за изпращане на съобщение",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Брой опити за повторно изпращане, преди съобщението да бъде маркирано като неуспешно.",
|
||||
"appSettings_ipfsImageLinks": "Конфигурация на IPFS доставчик",
|
||||
@@ -3668,5 +3660,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Съобщението не беше намерено в чата",
|
||||
"chat_clearSelection": "Изчисти избора",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Да се изтрие ли 1 съобщение от това устройство?} other{Да се изтрият ли {count} съобщения от това устройство?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Изтриване на съобщения?",
|
||||
"chat_messagesDeleted": "{count, plural, one{1 съобщение е изтрито} other{{count} съобщения са изтрити}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Избери всички",
|
||||
"chat_selectMessages": "Избор на съобщения",
|
||||
"chat_selectedCount": "{count} избрани",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Добави отново",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{1 съобщение е отбелязано като не е спам} other{{count} съобщения са отбелязани като не е спам}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{1 съобщение е отбелязано като спам} other{{count} съобщения са отбелязани като спам}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Разгъни списъка със скокове",
|
||||
"pathMap_showMap": "Покажи картата",
|
||||
"routing_modeDirect": "Директно",
|
||||
"routing_modeDirectHint": "Винаги изпраща направо към този контакт, без скокове през ретранслатори. Използвайте го, когато е в обхват на радиото."
|
||||
}
|
||||
+51
-9
@@ -556,14 +556,6 @@
|
||||
"appSettings_autoRouteRotationSubtitle": "Střídat nejlepší cesty a režim flood",
|
||||
"appSettings_autoRouteRotationEnabled": "Automatické střídání tras zapnuto",
|
||||
"appSettings_autoRouteRotationDisabled": "Automatické střídání tras vypnuto",
|
||||
"appSettings_maxRouteWeight": "Maximální váha trasy",
|
||||
"appSettings_maxRouteWeightSubtitle": "Maximální váha, kterou může cesta nasbírat z úspěšných doručení",
|
||||
"appSettings_initialRouteWeight": "Počáteční váha trasy",
|
||||
"appSettings_initialRouteWeightSubtitle": "Výchozí váha nově objevených cest",
|
||||
"appSettings_routeWeightSuccessIncrement": "Přírůstek váhy při úspěchu",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Váha přidaná cestě po úspěšném doručení",
|
||||
"appSettings_routeWeightFailureDecrement": "Úbytek váhy při neúspěchu",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Váha odebraná cestě po neúspěšném doručení",
|
||||
"appSettings_maxMessageRetries": "Maximum opakování zprávy",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Počet opakovaných pokusů, než se zpráva označí jako neodeslaná",
|
||||
"appSettings_ipfsImageLinks": "Konfigurace poskytovatele IPFS",
|
||||
@@ -4281,5 +4273,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Tuto zprávu se v chatu nepodařilo najít",
|
||||
"chat_clearSelection": "Zrušit výběr",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Smazat 1 zprávu z tohoto zařízení?} few{Smazat {count} zprávy z tohoto zařízení?} many{Smazat {count} zprávy z tohoto zařízení?} other{Smazat {count} zpráv z tohoto zařízení?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Smazat zprávy?",
|
||||
"chat_messagesDeleted": "{count, plural, one{Smazána 1 zpráva} few{Smazány {count} zprávy} many{Smazáno {count} zprávy} other{Smazáno {count} zpráv}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Vybrat vše",
|
||||
"chat_selectMessages": "Vybrat zprávy",
|
||||
"chat_selectedCount": "Vybráno: {count}",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Přidat znovu",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{1 zpráva označena jako ne-spam} few{{count} zprávy označeny jako ne-spam} many{{count} zprávy označeno jako ne-spam} other{{count} zpráv označeno jako ne-spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{1 zpráva označena jako spam} few{{count} zprávy označeny jako spam} many{{count} zprávy označeno jako spam} other{{count} zpráv označeno jako spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Rozbalit seznam skoků",
|
||||
"pathMap_showMap": "Zobrazit mapu",
|
||||
"routing_modeDirect": "Přímo",
|
||||
"routing_modeDirectHint": "Vždy odešle zprávu přímo tomuto kontaktu, bez skoků přes opakovače. Použijte, když je v dosahu rádia."
|
||||
}
|
||||
+51
-9
@@ -2360,14 +2360,6 @@
|
||||
"contact_lastSeen": "Zuletzt gesehen",
|
||||
"contact_clearChat": "Chat löschen",
|
||||
"contact_teleEnvSubtitle": "Teilen von Umgebungsensordaten zulassen",
|
||||
"appSettings_initialRouteWeightSubtitle": "Ausgangsgewicht für neu entdeckte Pfade",
|
||||
"appSettings_maxRouteWeightSubtitle": "Maximales Gewicht, das ein Weg durch erfolgreiche Lieferungen erreichen kann.",
|
||||
"appSettings_maxRouteWeight": "Maximale Gesamtstreckenlänge",
|
||||
"appSettings_initialRouteWeight": "Anfangs-Streckengewicht",
|
||||
"appSettings_routeWeightSuccessIncrement": "Erhöhung des Erfolgsgewichts",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Gewicht, das einem Pfad nach erfolgreicher Lieferung hinzugefügt wird.",
|
||||
"appSettings_routeWeightFailureDecrement": "Reduzierung des Gewichts bei Fehlern",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Gewicht, das nach einem fehlgeschlagenen Versand von einem Weg entfernt wurde",
|
||||
"appSettings_maxMessageRetries": "Maximale Anzahl an Wiederholungsversuchen",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Anzahl der Versuche, eine Nachricht erneut zu senden, bevor sie als fehlgeschlagen markiert wird.",
|
||||
"appSettings_ipfsImageLinks": "IPFS-Anbieter-Konfiguration",
|
||||
@@ -3803,5 +3795,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Diese Nachricht wurde im Chat nicht gefunden",
|
||||
"chat_clearSelection": "Auswahl aufheben",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{1 Nachricht von diesem Gerät löschen?} other{{count} Nachrichten von diesem Gerät löschen?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Nachrichten löschen?",
|
||||
"chat_messagesDeleted": "{count, plural, one{1 Nachricht gelöscht} other{{count} Nachrichten gelöscht}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Alle auswählen",
|
||||
"chat_selectMessages": "Nachrichten auswählen",
|
||||
"chat_selectedCount": "{count} ausgewählt",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Erneut hinzufügen",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{1 Nachricht als Kein Spam markiert} other{{count} Nachrichten als Kein Spam markiert}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{1 Nachricht als Spam markiert} other{{count} Nachrichten als Spam markiert}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Sprungliste erweitern",
|
||||
"pathMap_showMap": "Karte anzeigen",
|
||||
"routing_modeDirect": "Direkt",
|
||||
"routing_modeDirectHint": "Sendet immer direkt an diesen Kontakt, ohne Repeater-Sprünge. Nutzen Sie dies, wenn er in Funkreichweite ist."
|
||||
}
|
||||
+50
-8
@@ -557,14 +557,6 @@
|
||||
"appSettings_autoRouteRotationSubtitle": "Cycle between best paths and flood mode",
|
||||
"appSettings_autoRouteRotationEnabled": "Auto route rotation enabled",
|
||||
"appSettings_autoRouteRotationDisabled": "Auto route rotation disabled",
|
||||
"appSettings_maxRouteWeight": "Max Route Weight",
|
||||
"appSettings_maxRouteWeightSubtitle": "Maximum weight a path can accumulate from successful deliveries",
|
||||
"appSettings_initialRouteWeight": "Initial Route Weight",
|
||||
"appSettings_initialRouteWeightSubtitle": "Starting weight for newly discovered paths",
|
||||
"appSettings_routeWeightSuccessIncrement": "Success Weight Increment",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Weight added to a path after successful delivery",
|
||||
"appSettings_routeWeightFailureDecrement": "Failure Weight Decrement",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Weight removed from a path after failed delivery",
|
||||
"appSettings_maxMessageRetries": "Max Message Retries",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Number of retry attempts before marking a message as failed",
|
||||
"appSettings_ipfsImageLinks": "IPFS provider configuration",
|
||||
@@ -1029,6 +1021,7 @@
|
||||
},
|
||||
"chatSearch_noResults": "No matching messages",
|
||||
"chatSearch_noResultsHint": "Try a different word or check the spelling",
|
||||
"chatSearch_jumpFailed": "Couldn't find that message in the chat",
|
||||
"chat_sendMessage": "Send message",
|
||||
"chat_sendMessageTo": "Send a message to {contactName}",
|
||||
"@chat_sendMessageTo": {
|
||||
@@ -1069,6 +1062,50 @@
|
||||
},
|
||||
"chat_messageCopied": "Message copied",
|
||||
"chat_messageDeleted": "Message deleted",
|
||||
"chat_selectMessages": "Select messages",
|
||||
"chat_selectedCount": "{count} selected",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Select all",
|
||||
"chat_clearSelection": "Clear selection",
|
||||
"chat_deleteSelectedTitle": "Delete messages?",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, =1{Delete 1 message from this device?} other{Delete {count} messages from this device?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_messagesDeleted": "{count, plural, =1{1 message deleted} other{{count} messages deleted}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, =1{1 message marked as spam} other{{count} messages marked as spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, =1{1 message marked as not spam} other{{count} messages marked as not spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_retryingMessage": "Retrying message",
|
||||
"chat_retryCount": "Retry {current}/{max}",
|
||||
"@chat_retryCount": {
|
||||
@@ -1227,9 +1264,11 @@
|
||||
"routing_modeAuto": "Auto",
|
||||
"routing_modeFlood": "Flood",
|
||||
"routing_modeManual": "Manual",
|
||||
"routing_modeDirect": "Direct",
|
||||
"routing_modeAutoHint": "Picks the best known path automatically, flooding when none is known.",
|
||||
"routing_modeFloodHint": "Broadcasts through every repeater. Most reliable, but uses more airtime.",
|
||||
"routing_modeManualHint": "Always sends along the exact path you set.",
|
||||
"routing_modeDirectHint": "Always sends straight to this contact with no repeater hops. Use it when they are in radio range.",
|
||||
"routing_currentRoute": "Current route",
|
||||
"routing_directNoHops": "Direct — no repeater hops",
|
||||
"routing_noPathYet": "No path yet. The next message floods until a route is discovered.",
|
||||
@@ -1319,6 +1358,7 @@
|
||||
"contactShare_add": "Add contact",
|
||||
"contactShare_adding": "Adding contact...",
|
||||
"contactShare_saved": "Saved",
|
||||
"contactShare_addAgain": "Add again",
|
||||
"contactShare_isYou": "This is you",
|
||||
"contactShare_shareAction": "Share contact",
|
||||
"contactShare_pickerTitle": "Share a contact",
|
||||
@@ -3373,6 +3413,8 @@
|
||||
"pathMap_showPath": "Show path",
|
||||
"pathMap_collapsePanel": "Collapse panel",
|
||||
"pathMap_expandPanel": "Expand panel",
|
||||
"pathMap_expandHopList": "Expand hop list",
|
||||
"pathMap_showMap": "Show map",
|
||||
"pathMap_noLocation": "No location",
|
||||
"pathMap_followPacket": "Lock view to packet",
|
||||
"pathMap_unfollowPacket": "Unlock view from packet",
|
||||
|
||||
+51
-9
@@ -2291,14 +2291,6 @@
|
||||
"contact_teleBaseSubtitle": "Permitir el intercambio de nivel de batería y telemetría básica",
|
||||
"contact_teleEnv": "Entorno de Telemetría",
|
||||
"contact_teleEnvSubtitle": "Permitir el intercambio de datos de sensores de entorno",
|
||||
"appSettings_initialRouteWeight": "Peso inicial de la ruta",
|
||||
"appSettings_maxRouteWeight": "Peso máximo permitido para la ruta",
|
||||
"appSettings_initialRouteWeightSubtitle": "Peso inicial para rutas recién descubiertas",
|
||||
"appSettings_maxRouteWeightSubtitle": "Peso máximo que una ruta puede acumular gracias a entregas exitosas.",
|
||||
"appSettings_routeWeightSuccessIncrement": "Incremento de peso para el éxito",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Peso añadido a una ruta después de una entrega exitosa.",
|
||||
"appSettings_routeWeightFailureDecrement": "Reducción del peso asociado al fallo",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Peso retirado de una ruta después de un intento de entrega fallido.",
|
||||
"appSettings_maxMessageRetries": "Número máximo de reintentos de envío de mensajes",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Número de intentos de reintento antes de marcar un mensaje como fallido.",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -3854,5 +3846,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "No se encontró ese mensaje en el chat",
|
||||
"chat_clearSelection": "Borrar selección",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{¿Borrar 1 mensaje de este dispositivo?} other{¿Borrar {count} mensajes de este dispositivo?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "¿Borrar mensajes?",
|
||||
"chat_messagesDeleted": "{count, plural, one{1 mensaje borrado} other{{count} mensajes borrados}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Seleccionar todo",
|
||||
"chat_selectMessages": "Seleccionar mensajes",
|
||||
"chat_selectedCount": "{count} seleccionados",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Añadir de nuevo",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{1 mensaje marcado como no spam} other{{count} mensajes marcados como no spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{1 mensaje marcado como spam} other{{count} mensajes marcados como spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Ampliar lista de saltos",
|
||||
"pathMap_showMap": "Mostrar mapa",
|
||||
"routing_modeDirect": "Directo",
|
||||
"routing_modeDirectHint": "Envía siempre directamente a este contacto, sin saltos de repetidor. Úselo cuando esté al alcance de la radio."
|
||||
}
|
||||
+51
-9
@@ -2284,14 +2284,6 @@
|
||||
"contact_lastSeen": "Vu pour la dernière fois",
|
||||
"contact_clearChat": "Effacer la conversation",
|
||||
"contact_teleBaseSubtitle": "Autoriser le partage du niveau de batterie et de la télémétrie de base",
|
||||
"appSettings_maxRouteWeightSubtitle": "Poids maximal qu'un chemin peut accumuler grâce aux livraisons réussies.",
|
||||
"appSettings_initialRouteWeight": "Poids initial de l'itinéraire",
|
||||
"appSettings_maxRouteWeight": "Poids maximal du chemin",
|
||||
"appSettings_initialRouteWeightSubtitle": "Poids de départ pour les nouveaux chemins découverts",
|
||||
"appSettings_routeWeightSuccessIncrement": "Incrément du poids de succès",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Poids ajouté à un chemin après une livraison réussie.",
|
||||
"appSettings_routeWeightFailureDecrement": "Décrément du poids d'échec",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Poids retiré d'un chemin après une tentative de livraison infructueuse.",
|
||||
"appSettings_maxMessageRetries": "Nombre maximal de tentatives d'envoi",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Nombre de tentatives avant de marquer un message comme ayant échoué.",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -3802,5 +3794,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Impossible de trouver ce message dans la discussion",
|
||||
"chat_clearSelection": "Effacer la sélection",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Supprimer 1 message de cet appareil ?} other{Supprimer {count} messages de cet appareil ?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Supprimer les messages ?",
|
||||
"chat_messagesDeleted": "{count, plural, one{1 message supprimé} other{{count} messages supprimés}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Tout sélectionner",
|
||||
"chat_selectMessages": "Sélectionner des messages",
|
||||
"chat_selectedCount": "{count} sélectionné(s)",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Ajouter à nouveau",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{1 message marqué comme pas un spam} other{{count} messages marqués comme pas un spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{1 message marqué comme spam} other{{count} messages marqués comme spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Agrandir la liste des relais",
|
||||
"pathMap_showMap": "Afficher la carte",
|
||||
"routing_modeDirect": "Direct",
|
||||
"routing_modeDirectHint": "Envoie toujours directement à ce contact, sans relais. À utiliser quand il est à portée radio."
|
||||
}
|
||||
+52
-10
@@ -276,14 +276,6 @@
|
||||
"appSettings_autoRouteRotationSubtitle": "Váltson a legjobb útvonalak és az elárasztási mód között",
|
||||
"appSettings_autoRouteRotationEnabled": "Az automatikus útvonalforgatás engedélyezve",
|
||||
"appSettings_autoRouteRotationDisabled": "Az automatikus útvonalforgatás letiltva",
|
||||
"appSettings_maxRouteWeight": "Maximális útvonalsúly",
|
||||
"appSettings_maxRouteWeightSubtitle": "Maximális súly, amelyet egy útvonal felhalmozhat a sikeres szállításokból",
|
||||
"appSettings_initialRouteWeight": "Az útvonal kezdeti súlya",
|
||||
"appSettings_initialRouteWeightSubtitle": "Kezdősúly az újonnan felfedezett utakhoz",
|
||||
"appSettings_routeWeightSuccessIncrement": "Siker súlynövekedés",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Súly hozzáadva egy útvonalhoz a sikeres szállítás után",
|
||||
"appSettings_routeWeightFailureDecrement": "Hiba súlycsökkentés",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Sikertelen szállítás után eltávolított súly az útvonalról",
|
||||
"appSettings_maxMessageRetries": "Üzenet újrapróbálkozások maximális száma",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Az üzenet sikertelenként való megjelölése előtti újrapróbálkozások száma",
|
||||
"appSettings_ipfsImageLinks": "IPFS-szolgáltató beállítása",
|
||||
@@ -2644,7 +2636,7 @@
|
||||
"routing_title": "Útválasztás",
|
||||
"routing_modeAuto": "Auto",
|
||||
"routing_modeFlood": "Elárasztás",
|
||||
"routing_modeManual": "Kézikönyv",
|
||||
"routing_modeManual": "Kézi",
|
||||
"routing_modeAutoHint": "Automatikusan kiválasztja a legismertebb utat, és elárasztja, ha nem ismert.",
|
||||
"routing_modeFloodHint": "Minden átjátszón keresztül sugároz. A legmegbízhatóbb, de több műsoridőt használ.",
|
||||
"routing_modeManualHint": "Mindig pontosan az Ön által megadott útvonalon küld.",
|
||||
@@ -3759,5 +3751,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Ez az üzenet nem található a csevegésben",
|
||||
"chat_clearSelection": "Kijelölés törlése",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Törli az 1 üzenetet erről az eszközről?} other{Törli a(z) {count} üzenetet erről az eszközről?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Törli az üzeneteket?",
|
||||
"chat_messagesDeleted": "{count, plural, one{1 üzenet törölve} other{{count} üzenet törölve}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Összes kijelölése",
|
||||
"chat_selectMessages": "Üzenetek kijelölése",
|
||||
"chat_selectedCount": "{count} kijelölve",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Hozzáadás újra",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{1 üzenet nem spamként megjelölve} other{{count} üzenet nem spamként megjelölve}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{1 üzenet spamként megjelölve} other{{count} üzenet spamként megjelölve}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Ugráslista kibontása",
|
||||
"pathMap_showMap": "Térkép megjelenítése",
|
||||
"routing_modeDirect": "Közvetlen",
|
||||
"routing_modeDirectHint": "Mindig közvetlenül ennek a névjegynek küld, átjátszó ugrások nélkül. Akkor használja, ha rádiótávolságon belül van."
|
||||
}
|
||||
+51
-9
@@ -2297,14 +2297,6 @@
|
||||
"contact_teleBaseSubtitle": "Consenti la condivisione del livello della batteria e della telemetria di base",
|
||||
"contact_teleEnvSubtitle": "Consenti la condivisione dei dati del sensore ambientale",
|
||||
"contact_teleEnv": "Ambiente di telemetria",
|
||||
"appSettings_initialRouteWeight": "Peso iniziale del percorso",
|
||||
"appSettings_initialRouteWeightSubtitle": "Peso di partenza per nuovi percorsi",
|
||||
"appSettings_maxRouteWeightSubtitle": "Il peso massimo che un percorso può accumulare grazie a consegne di successo.",
|
||||
"appSettings_maxRouteWeight": "Massimo peso consentito per il percorso",
|
||||
"appSettings_routeWeightSuccessIncrement": "Aumento del peso del successo",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Peso aggiunto a un percorso dopo una consegna riuscita.",
|
||||
"appSettings_routeWeightFailureDecrement": "Riduzione del peso associato al fallimento",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Peso rimosso da un percorso dopo un tentativo di consegna fallito.",
|
||||
"appSettings_maxMessageRetries": "Numero massimo di tentativi di invio del messaggio",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Numero di tentativi di riprova prima di considerare un messaggio come fallito.",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -3802,5 +3794,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Impossibile trovare quel messaggio nella chat",
|
||||
"chat_clearSelection": "Annulla selezione",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, =1{Eliminare 1 messaggio da questo dispositivo?} other{Eliminare {count} messaggi da questo dispositivo?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Eliminare i messaggi?",
|
||||
"chat_messagesDeleted": "{count, plural, =1{1 messaggio eliminato} other{{count} messaggi eliminati}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Seleziona tutto",
|
||||
"chat_selectMessages": "Seleziona messaggi",
|
||||
"chat_selectedCount": "{count} selezionati",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Aggiungi di nuovo",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, =1{1 messaggio segnato come non spam} other{{count} messaggi segnati come non spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, =1{1 messaggio segnato come spam} other{{count} messaggi segnati come spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Espandi elenco dei salti",
|
||||
"pathMap_showMap": "Mostra mappa",
|
||||
"routing_modeDirect": "Diretto",
|
||||
"routing_modeDirectHint": "Invia sempre direttamente a questo contatto, senza salti tramite ripetitori. Usalo quando è nel raggio radio."
|
||||
}
|
||||
+51
-9
@@ -282,14 +282,6 @@
|
||||
"appSettings_autoRouteRotationSubtitle": "最適な経路とフラッドモードを切り替えます",
|
||||
"appSettings_autoRouteRotationEnabled": "自動経路切り替えが有効です",
|
||||
"appSettings_autoRouteRotationDisabled": "自動経路切り替えは無効です",
|
||||
"appSettings_maxRouteWeight": "最大経路重み",
|
||||
"appSettings_maxRouteWeightSubtitle": "成功配送によって経路に蓄積できる最大重み",
|
||||
"appSettings_initialRouteWeight": "初期経路重み",
|
||||
"appSettings_initialRouteWeightSubtitle": "新しく発見された経路の初期重み",
|
||||
"appSettings_routeWeightSuccessIncrement": "成功時の重み増加",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "成功配送後に経路へ加算する重み",
|
||||
"appSettings_routeWeightFailureDecrement": "失敗時の重み減少",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "失敗配送後に経路から差し引く重み",
|
||||
"appSettings_maxMessageRetries": "最大メッセージ再試行回数",
|
||||
"appSettings_maxMessageRetriesSubtitle": "メッセージを失敗として扱うまでの再試行回数",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -4008,5 +4000,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "チャット内でそのメッセージが見つかりませんでした",
|
||||
"chat_clearSelection": "選択を解除",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, other{この端末からメッセージ {count} 件を削除しますか?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "メッセージを削除しますか?",
|
||||
"chat_messagesDeleted": "{count, plural, other{メッセージ {count} 件を削除しました}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "すべて選択",
|
||||
"chat_selectMessages": "メッセージを選択",
|
||||
"chat_selectedCount": "{count} 件を選択中",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "もう一度追加",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, other{メッセージ {count} 件をスパムではないとマークしました}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, other{メッセージ {count} 件をスパムとしてマークしました}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "ホップ一覧を広げる",
|
||||
"pathMap_showMap": "地図を表示",
|
||||
"routing_modeDirect": "直接",
|
||||
"routing_modeDirectHint": "中継ホップなしで、常にこの連絡先へ直接送信します。相手が電波の届く範囲にいるときに使います。"
|
||||
}
|
||||
+51
-9
@@ -276,14 +276,6 @@
|
||||
"appSettings_autoRouteRotationSubtitle": "최적 경로와 플러딩 모드 사이를 전환합니다.",
|
||||
"appSettings_autoRouteRotationEnabled": "자동 경로 순환 기능 활성화",
|
||||
"appSettings_autoRouteRotationDisabled": "자동 경로 순환 기능 비활성화",
|
||||
"appSettings_maxRouteWeight": "최대 경로 가중치",
|
||||
"appSettings_maxRouteWeightSubtitle": "한 경로가 성공적인 전송을 통해 누적할 수 있는 최대 가중치",
|
||||
"appSettings_initialRouteWeight": "초기 경로 가중치",
|
||||
"appSettings_initialRouteWeightSubtitle": "새로 발견된 경로의 초기 가중치",
|
||||
"appSettings_routeWeightSuccessIncrement": "성공 시 증가",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "성공적으로 전송된 경로에 추가되는 가중치",
|
||||
"appSettings_routeWeightFailureDecrement": "실패 시 감소",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "전송 실패 후 경로에서 제거되는 가중치",
|
||||
"appSettings_maxMessageRetries": "최대 메시지 재시도 횟수",
|
||||
"appSettings_maxMessageRetriesSubtitle": "메시지를 실패로 처리하기 전 시도 횟수",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -4008,5 +4000,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "채팅에서 해당 메시지를 찾을 수 없습니다",
|
||||
"chat_clearSelection": "선택 해제",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, other{이 기기에서 메시지 {count}개를 삭제하시겠습니까?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "메시지를 삭제하시겠습니까?",
|
||||
"chat_messagesDeleted": "{count, plural, other{메시지 {count}개를 삭제했습니다}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "모두 선택",
|
||||
"chat_selectMessages": "메시지 선택",
|
||||
"chat_selectedCount": "{count}개 선택됨",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "다시 추가",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, other{메시지 {count}개를 스팸 아님으로 표시했습니다}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, other{메시지 {count}개를 스팸으로 표시했습니다}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "중계 목록 펼치기",
|
||||
"pathMap_showMap": "지도 보기",
|
||||
"routing_modeDirect": "직접",
|
||||
"routing_modeDirectHint": "중계기를 거치지 않고 항상 이 연락처로 바로 보냅니다. 상대가 무선 범위 안에 있을 때 사용하세요."
|
||||
}
|
||||
@@ -2328,54 +2328,6 @@ abstract class AppLocalizations {
|
||||
/// **'Auto route rotation disabled'**
|
||||
String get appSettings_autoRouteRotationDisabled;
|
||||
|
||||
/// No description provided for @appSettings_maxRouteWeight.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Max Route Weight'**
|
||||
String get appSettings_maxRouteWeight;
|
||||
|
||||
/// No description provided for @appSettings_maxRouteWeightSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Maximum weight a path can accumulate from successful deliveries'**
|
||||
String get appSettings_maxRouteWeightSubtitle;
|
||||
|
||||
/// No description provided for @appSettings_initialRouteWeight.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Initial Route Weight'**
|
||||
String get appSettings_initialRouteWeight;
|
||||
|
||||
/// No description provided for @appSettings_initialRouteWeightSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Starting weight for newly discovered paths'**
|
||||
String get appSettings_initialRouteWeightSubtitle;
|
||||
|
||||
/// No description provided for @appSettings_routeWeightSuccessIncrement.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Success Weight Increment'**
|
||||
String get appSettings_routeWeightSuccessIncrement;
|
||||
|
||||
/// No description provided for @appSettings_routeWeightSuccessIncrementSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Weight added to a path after successful delivery'**
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle;
|
||||
|
||||
/// No description provided for @appSettings_routeWeightFailureDecrement.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Failure Weight Decrement'**
|
||||
String get appSettings_routeWeightFailureDecrement;
|
||||
|
||||
/// No description provided for @appSettings_routeWeightFailureDecrementSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Weight removed from a path after failed delivery'**
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle;
|
||||
|
||||
/// No description provided for @appSettings_maxMessageRetries.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -3672,6 +3624,12 @@ abstract class AppLocalizations {
|
||||
/// **'Try a different word or check the spelling'**
|
||||
String get chatSearch_noResultsHint;
|
||||
|
||||
/// No description provided for @chatSearch_jumpFailed.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Couldn\'t find that message in the chat'**
|
||||
String get chatSearch_jumpFailed;
|
||||
|
||||
/// No description provided for @chat_sendMessage.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -3744,6 +3702,60 @@ abstract class AppLocalizations {
|
||||
/// **'Message deleted'**
|
||||
String get chat_messageDeleted;
|
||||
|
||||
/// No description provided for @chat_selectMessages.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Select messages'**
|
||||
String get chat_selectMessages;
|
||||
|
||||
/// No description provided for @chat_selectedCount.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{count} selected'**
|
||||
String chat_selectedCount(int count);
|
||||
|
||||
/// No description provided for @chat_selectAll.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Select all'**
|
||||
String get chat_selectAll;
|
||||
|
||||
/// No description provided for @chat_clearSelection.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Clear selection'**
|
||||
String get chat_clearSelection;
|
||||
|
||||
/// No description provided for @chat_deleteSelectedTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Delete messages?'**
|
||||
String get chat_deleteSelectedTitle;
|
||||
|
||||
/// No description provided for @chat_deleteSelectedConfirm.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{count, plural, =1{Delete 1 message from this device?} other{Delete {count} messages from this device?}}'**
|
||||
String chat_deleteSelectedConfirm(int count);
|
||||
|
||||
/// No description provided for @chat_messagesDeleted.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{count, plural, =1{1 message deleted} other{{count} messages deleted}}'**
|
||||
String chat_messagesDeleted(int count);
|
||||
|
||||
/// No description provided for @messageFilter_markedSpamCount.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{count, plural, =1{1 message marked as spam} other{{count} messages marked as spam}}'**
|
||||
String messageFilter_markedSpamCount(int count);
|
||||
|
||||
/// No description provided for @messageFilter_markedNotSpamCount.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{count, plural, =1{1 message marked as not spam} other{{count} messages marked as not spam}}'**
|
||||
String messageFilter_markedNotSpamCount(int count);
|
||||
|
||||
/// No description provided for @chat_retryingMessage.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -4146,6 +4158,12 @@ abstract class AppLocalizations {
|
||||
/// **'Manual'**
|
||||
String get routing_modeManual;
|
||||
|
||||
/// No description provided for @routing_modeDirect.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Direct'**
|
||||
String get routing_modeDirect;
|
||||
|
||||
/// No description provided for @routing_modeAutoHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -4164,6 +4182,12 @@ abstract class AppLocalizations {
|
||||
/// **'Always sends along the exact path you set.'**
|
||||
String get routing_modeManualHint;
|
||||
|
||||
/// No description provided for @routing_modeDirectHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Always sends straight to this contact with no repeater hops. Use it when they are in radio range.'**
|
||||
String get routing_modeDirectHint;
|
||||
|
||||
/// No description provided for @routing_currentRoute.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -4470,6 +4494,12 @@ abstract class AppLocalizations {
|
||||
/// **'Saved'**
|
||||
String get contactShare_saved;
|
||||
|
||||
/// No description provided for @contactShare_addAgain.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Add again'**
|
||||
String get contactShare_addAgain;
|
||||
|
||||
/// No description provided for @contactShare_isYou.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -10138,6 +10168,18 @@ abstract class AppLocalizations {
|
||||
/// **'Expand panel'**
|
||||
String get pathMap_expandPanel;
|
||||
|
||||
/// No description provided for @pathMap_expandHopList.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Expand hop list'**
|
||||
String get pathMap_expandHopList;
|
||||
|
||||
/// No description provided for @pathMap_showMap.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Show map'**
|
||||
String get pathMap_showMap;
|
||||
|
||||
/// No description provided for @pathMap_noLocation.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -1276,38 +1276,6 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Автоматичната ротация на маршрутите е изключена';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight =>
|
||||
'Максимално допустимо тегло на маршрута';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Максималното тегло, което един маршрут може да събере от успешни доставки.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight =>
|
||||
'Първоначална тежест на маршрута';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Начално тегло за новооткрити маршрути';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Увеличение на теглото за успех';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Тегло, добавено към път след успешно доставяне.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Намаляване на теглото, свързано с неуспех';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Тегло, което е било премахнато от пътя след неуспешен опит за доставка.';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Максимален брой опити за изпращане на съобщение';
|
||||
@@ -2074,6 +2042,9 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Опитайте с друга дума или проверете правописа';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'Съобщението не беше намерено в чата';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Изпратете съобщение';
|
||||
|
||||
@@ -2119,6 +2090,67 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Съобщението е изтрито';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Избор на съобщения';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count избрани';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Избери всички';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Изчисти избора';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Изтриване на съобщения?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Да се изтрият ли $count съобщения от това устройство?',
|
||||
one: 'Да се изтрие ли 1 съобщение от това устройство?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count съобщения са изтрити',
|
||||
one: '1 съобщение е изтрито',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count съобщения са отбелязани като спам',
|
||||
one: '1 съобщение е отбелязано като спам',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count съобщения са отбелязани като не е спам',
|
||||
one: '1 съобщение е отбелязано като не е спам',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Опитваме се отново.';
|
||||
|
||||
@@ -2358,6 +2390,9 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Ръчно';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Директно';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Автоматично избира най-добрия известен път, а при липса на такъв използва режим Flood.';
|
||||
@@ -2370,6 +2405,10 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Винаги следва точно пътя, който сте определили.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Винаги изпраща направо към този контакт, без скокове през ретранслатори. Използвайте го, когато е в обхват на радиото.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Текущ маршрут';
|
||||
|
||||
@@ -2540,6 +2579,9 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Запазен';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Добави отново';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Това сте вие';
|
||||
|
||||
@@ -5980,6 +6022,12 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Разгъни панела';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Разгъни списъка със скокове';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Покажи картата';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Без посочено местоположение';
|
||||
|
||||
|
||||
@@ -1271,36 +1271,6 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Automatické střídání tras vypnuto';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Maximální váha trasy';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Maximální váha, kterou může cesta nasbírat z úspěšných doručení';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Počáteční váha trasy';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Výchozí váha nově objevených cest';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Přírůstek váhy při úspěchu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Váha přidaná cestě po úspěšném doručení';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Úbytek váhy při neúspěchu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Váha odebraná cestě po neúspěšném doručení';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries => 'Maximum opakování zprávy';
|
||||
|
||||
@@ -2061,6 +2031,9 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Zkuste jiné slovo nebo zkontrolujte překlepy';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'Tuto zprávu se v chatu nepodařilo najít';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Odeslat zprávu';
|
||||
|
||||
@@ -2106,6 +2079,75 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Zpráva smazána';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Vybrat zprávy';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return 'Vybráno: $count';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Vybrat vše';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Zrušit výběr';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Smazat zprávy?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Smazat $count zpráv z tohoto zařízení?',
|
||||
many: 'Smazat $count zprávy z tohoto zařízení?',
|
||||
few: 'Smazat $count zprávy z tohoto zařízení?',
|
||||
one: 'Smazat 1 zprávu z tohoto zařízení?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Smazáno $count zpráv',
|
||||
many: 'Smazáno $count zprávy',
|
||||
few: 'Smazány $count zprávy',
|
||||
one: 'Smazána 1 zpráva',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count zpráv označeno jako spam',
|
||||
many: '$count zprávy označeno jako spam',
|
||||
few: '$count zprávy označeny jako spam',
|
||||
one: '1 zpráva označena jako spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count zpráv označeno jako ne-spam',
|
||||
many: '$count zprávy označeno jako ne-spam',
|
||||
few: '$count zprávy označeny jako ne-spam',
|
||||
one: '1 zpráva označena jako ne-spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Opakované odesílání zprávy';
|
||||
|
||||
@@ -2346,6 +2388,9 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Ručně';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Přímo';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Automaticky vybere nejlepší známou cestu a pokud žádnou nezná, použije flood.';
|
||||
@@ -2358,6 +2403,10 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Vždy odesílá přesně po cestě, kterou nastavíte.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Vždy odešle zprávu přímo tomuto kontaktu, bez skoků přes opakovače. Použijte, když je v dosahu rádia.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Aktuální trasa';
|
||||
|
||||
@@ -2524,6 +2573,9 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Uloženo';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Přidat znovu';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'To jste vy';
|
||||
|
||||
@@ -5961,6 +6013,12 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Rozbalit panel';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Rozbalit seznam skoků';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Zobrazit mapu';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Bez polohy';
|
||||
|
||||
|
||||
@@ -1277,36 +1277,6 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Automatische Routenrotation deaktiviert';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Maximale Gesamtstreckenlänge';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Maximales Gewicht, das ein Weg durch erfolgreiche Lieferungen erreichen kann.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Anfangs-Streckengewicht';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Ausgangsgewicht für neu entdeckte Pfade';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Erhöhung des Erfolgsgewichts';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Gewicht, das einem Pfad nach erfolgreicher Lieferung hinzugefügt wird.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Reduzierung des Gewichts bei Fehlern';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Gewicht, das nach einem fehlgeschlagenen Versand von einem Weg entfernt wurde';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Maximale Anzahl an Wiederholungsversuchen';
|
||||
@@ -2074,6 +2044,10 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Versuchen Sie ein anderes Wort oder prüfen Sie die Schreibweise';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Diese Nachricht wurde im Chat nicht gefunden';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Nachricht senden';
|
||||
|
||||
@@ -2120,6 +2094,67 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Nachricht gelöscht';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Nachrichten auswählen';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count ausgewählt';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Alle auswählen';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Auswahl aufheben';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Nachrichten löschen?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count Nachrichten von diesem Gerät löschen?',
|
||||
one: '1 Nachricht von diesem Gerät löschen?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count Nachrichten gelöscht',
|
||||
one: '1 Nachricht gelöscht',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count Nachrichten als Spam markiert',
|
||||
one: '1 Nachricht als Spam markiert',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count Nachrichten als Kein Spam markiert',
|
||||
one: '1 Nachricht als Kein Spam markiert',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Nachricht wird erneut gesendet.';
|
||||
|
||||
@@ -2358,6 +2393,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Manuell';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Direkt';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Wählt automatisch den besten bekannten Pfad und wechselt in den Flood-Modus, wenn keiner bekannt ist.';
|
||||
@@ -2370,6 +2408,10 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Sendet immer genau den von Ihnen festgelegten Pfad.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Sendet immer direkt an diesen Kontakt, ohne Repeater-Sprünge. Nutzen Sie dies, wenn er in Funkreichweite ist.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Aktuelle Route';
|
||||
|
||||
@@ -2539,6 +2581,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Gespeichert';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Erneut hinzufügen';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Das sind Sie';
|
||||
|
||||
@@ -5995,6 +6040,12 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Panel ausklappen';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Sprungliste erweitern';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Karte anzeigen';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Keine Standortdaten';
|
||||
|
||||
|
||||
@@ -1255,36 +1255,6 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Auto route rotation disabled';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Max Route Weight';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Maximum weight a path can accumulate from successful deliveries';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Initial Route Weight';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Starting weight for newly discovered paths';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Success Weight Increment';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Weight added to a path after successful delivery';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Failure Weight Decrement';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Weight removed from a path after failed delivery';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries => 'Max Message Retries';
|
||||
|
||||
@@ -2037,6 +2007,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Try a different word or check the spelling';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'Couldn\'t find that message in the chat';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Send message';
|
||||
|
||||
@@ -2082,6 +2055,67 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Message deleted';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Select messages';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count selected';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Select all';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Clear selection';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Delete messages?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Delete $count messages from this device?',
|
||||
one: 'Delete 1 message from this device?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messages deleted',
|
||||
one: '1 message deleted',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messages marked as spam',
|
||||
one: '1 message marked as spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messages marked as not spam',
|
||||
one: '1 message marked as not spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Retrying message';
|
||||
|
||||
@@ -2319,6 +2353,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Manual';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Direct';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Picks the best known path automatically, flooding when none is known.';
|
||||
@@ -2331,6 +2368,10 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Always sends along the exact path you set.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Always sends straight to this contact with no repeater hops. Use it when they are in radio range.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Current route';
|
||||
|
||||
@@ -2497,6 +2538,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Saved';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Add again';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'This is you';
|
||||
|
||||
@@ -5898,6 +5942,12 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Expand panel';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Expand hop list';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Show map';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'No location';
|
||||
|
||||
|
||||
@@ -1268,36 +1268,6 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Rotación de ruta automática desactivada';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Peso máximo permitido para la ruta';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Peso máximo que una ruta puede acumular gracias a entregas exitosas.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Peso inicial de la ruta';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Peso inicial para rutas recién descubiertas';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Incremento de peso para el éxito';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Peso añadido a una ruta después de una entrega exitosa.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Reducción del peso asociado al fallo';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Peso retirado de una ruta después de un intento de entrega fallido.';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Número máximo de reintentos de envío de mensajes';
|
||||
@@ -2066,6 +2036,9 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Prueba con otra palabra o revisa la ortografía';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'No se encontró ese mensaje en el chat';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Enviar mensaje';
|
||||
|
||||
@@ -2111,6 +2084,67 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Mensaje borrado';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Seleccionar mensajes';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count seleccionados';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Seleccionar todo';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Borrar selección';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => '¿Borrar mensajes?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '¿Borrar $count mensajes de este dispositivo?',
|
||||
one: '¿Borrar 1 mensaje de este dispositivo?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count mensajes borrados',
|
||||
one: '1 mensaje borrado',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count mensajes marcados como spam',
|
||||
one: '1 mensaje marcado como spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count mensajes marcados como no spam',
|
||||
one: '1 mensaje marcado como no spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Reintentando…';
|
||||
|
||||
@@ -2349,6 +2383,9 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Manual';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Directo';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Selecciona automáticamente la mejor ruta conocida y, si no hay ninguna, usa el modo de inundación.';
|
||||
@@ -2361,6 +2398,10 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Siempre sigue exactamente la ruta que has definido.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Envía siempre directamente a este contacto, sin saltos de repetidor. Úselo cuando esté al alcance de la radio.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Ruta actual';
|
||||
|
||||
@@ -2529,6 +2570,9 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Guardado';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Añadir de nuevo';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Eres tú';
|
||||
|
||||
@@ -5981,6 +6025,12 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Ampliar panel';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Ampliar lista de saltos';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Mostrar mapa';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Sin ubicación';
|
||||
|
||||
|
||||
@@ -1276,36 +1276,6 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Rotation automatique du routage désactivée';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Poids maximal du chemin';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Poids maximal qu\'un chemin peut accumuler grâce aux livraisons réussies.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Poids initial de l\'itinéraire';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Poids de départ pour les nouveaux chemins découverts';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Incrément du poids de succès';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Poids ajouté à un chemin après une livraison réussie.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Décrément du poids d\'échec';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Poids retiré d\'un chemin après une tentative de livraison infructueuse.';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Nombre maximal de tentatives d\'envoi';
|
||||
@@ -2072,6 +2042,10 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Essayez un autre mot ou vérifiez l\'orthographe';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Impossible de trouver ce message dans la discussion';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Envoyer un message';
|
||||
|
||||
@@ -2117,6 +2091,67 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Message supprimé';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Sélectionner des messages';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count sélectionné(s)';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Tout sélectionner';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Effacer la sélection';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Supprimer les messages ?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Supprimer $count messages de cet appareil ?',
|
||||
one: 'Supprimer 1 message de cet appareil ?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messages supprimés',
|
||||
one: '1 message supprimé',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messages marqués comme spam',
|
||||
one: '1 message marqué comme spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messages marqués comme pas un spam',
|
||||
one: '1 message marqué comme pas un spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Nouvelle tentative d\'envoi du message';
|
||||
|
||||
@@ -2355,6 +2390,9 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Manuel';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Direct';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Sélectionne automatiquement le meilleur chemin connu, et utilise le flood si aucun chemin n\'est connu.';
|
||||
@@ -2367,6 +2405,10 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Envoie toujours selon le chemin exact que vous avez défini.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Envoie toujours directement à ce contact, sans relais. À utiliser quand il est à portée radio.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Route actuelle';
|
||||
|
||||
@@ -2536,6 +2578,9 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Enregistré';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Ajouter à nouveau';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'C\'est vous';
|
||||
|
||||
@@ -6005,6 +6050,12 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Développer le panneau';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Agrandir la liste des relais';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Afficher la carte';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Aucune localisation';
|
||||
|
||||
|
||||
@@ -1268,34 +1268,6 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Az automatikus útvonalforgatás letiltva';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Maximális útvonalsúly';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Maximális súly, amelyet egy útvonal felhalmozhat a sikeres szállításokból';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Az útvonal kezdeti súlya';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Kezdősúly az újonnan felfedezett utakhoz';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement => 'Siker súlynövekedés';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Súly hozzáadva egy útvonalhoz a sikeres szállítás után';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement => 'Hiba súlycsökkentés';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Sikertelen szállítás után eltávolított súly az útvonalról';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Üzenet újrapróbálkozások maximális száma';
|
||||
@@ -2063,6 +2035,10 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Próbálj másik szót, vagy ellenőrizd a helyesírást';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Ez az üzenet nem található a csevegésben';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Üzenet küldése';
|
||||
|
||||
@@ -2108,6 +2084,67 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Üzenet törölve';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Üzenetek kijelölése';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count kijelölve';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Összes kijelölése';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Kijelölés törlése';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Törli az üzeneteket?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Törli a(z) $count üzenetet erről az eszközről?',
|
||||
one: 'Törli az 1 üzenetet erről az eszközről?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count üzenet törölve',
|
||||
one: '1 üzenet törölve',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count üzenet spamként megjelölve',
|
||||
one: '1 üzenet spamként megjelölve',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count üzenet nem spamként megjelölve',
|
||||
one: '1 üzenet nem spamként megjelölve',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Üzenet újrapróbálkozása';
|
||||
|
||||
@@ -2343,7 +2380,10 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
String get routing_modeFlood => 'Elárasztás';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => 'Kézikönyv';
|
||||
String get routing_modeManual => 'Kézi';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Közvetlen';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
@@ -2357,6 +2397,10 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Mindig pontosan az Ön által megadott útvonalon küld.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Mindig közvetlenül ennek a névjegynek küld, átjátszó ugrások nélkül. Akkor használja, ha rádiótávolságon belül van.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Jelenlegi útvonal';
|
||||
|
||||
@@ -2525,6 +2569,9 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Mentve';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Hozzáadás újra';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Ez te vagy';
|
||||
|
||||
@@ -5977,6 +6024,12 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Panel kibontása';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Ugráslista kibontása';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Térkép megjelenítése';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Nincs hely';
|
||||
|
||||
|
||||
@@ -1276,37 +1276,6 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Rotazione del percorso automatico disabilitata';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight =>
|
||||
'Massimo peso consentito per il percorso';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Il peso massimo che un percorso può accumulare grazie a consegne di successo.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Peso iniziale del percorso';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Peso di partenza per nuovi percorsi';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Aumento del peso del successo';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Peso aggiunto a un percorso dopo una consegna riuscita.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Riduzione del peso associato al fallimento';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Peso rimosso da un percorso dopo un tentativo di consegna fallito.';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Numero massimo di tentativi di invio del messaggio';
|
||||
@@ -2072,6 +2041,10 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Prova con un\'altra parola o controlla l\'ortografia';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Impossibile trovare quel messaggio nella chat';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Invia messaggio';
|
||||
|
||||
@@ -2117,6 +2090,67 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Messaggio eliminato';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Seleziona messaggi';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count selezionati';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Seleziona tutto';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Annulla selezione';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Eliminare i messaggi?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Eliminare $count messaggi da questo dispositivo?',
|
||||
one: 'Eliminare 1 messaggio da questo dispositivo?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messaggi eliminati',
|
||||
one: '1 messaggio eliminato',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messaggi segnati come spam',
|
||||
one: '1 messaggio segnato come spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count messaggi segnati come non spam',
|
||||
one: '1 messaggio segnato come non spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Riprovo';
|
||||
|
||||
@@ -2356,6 +2390,9 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Manuale';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Diretto';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Seleziona automaticamente il percorso migliore noto, ricorrendo al flood quando non ne è noto nessuno.';
|
||||
@@ -2368,6 +2405,10 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Invia sempre lungo il percorso esatto che hai definito.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Invia sempre direttamente a questo contatto, senza salti tramite ripetitori. Usalo quando è nel raggio radio.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Percorso attuale';
|
||||
|
||||
@@ -2538,6 +2579,9 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Salvato';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Aggiungi di nuovo';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Sei tu';
|
||||
|
||||
@@ -5990,6 +6034,12 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Espandi pannello';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Espandi elenco dei salti';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Mostra mappa';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Nessuna posizione';
|
||||
|
||||
|
||||
@@ -1208,32 +1208,6 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_autoRouteRotationDisabled => '自動経路切り替えは無効です';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => '最大経路重み';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle => '成功配送によって経路に蓄積できる最大重み';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => '初期経路重み';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle => '新しく発見された経路の初期重み';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement => '成功時の重み増加';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'成功配送後に経路へ加算する重み';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement => '失敗時の重み減少';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'失敗配送後に経路から差し引く重み';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries => '最大メッセージ再試行回数';
|
||||
|
||||
@@ -1965,6 +1939,9 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get chatSearch_noResultsHint => '別の単語を試すか、スペルを確認してください';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'チャット内でそのメッセージが見つかりませんでした';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'メッセージを送信する';
|
||||
|
||||
@@ -2010,6 +1987,63 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'メッセージは削除されました';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'メッセージを選択';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count 件を選択中';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'すべて選択';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => '選択を解除';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'メッセージを削除しますか?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'この端末からメッセージ $count 件を削除しますか?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'メッセージ $count 件を削除しました',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'メッセージ $count 件をスパムとしてマークしました',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'メッセージ $count 件をスパムではないとマークしました',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'メッセージを再試行中';
|
||||
|
||||
@@ -2244,6 +2278,9 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => '手動';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => '直接';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint => '既知の最良経路を自動で選び、経路がないときはフラッドします。';
|
||||
|
||||
@@ -2254,6 +2291,10 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManualHint => '常に、設定した正確な経路を使います。';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'中継ホップなしで、常にこの連絡先へ直接送信します。相手が電波の届く範囲にいるときに使います。';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => '現在の経路';
|
||||
|
||||
@@ -2418,6 +2459,9 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => '登録済み';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'もう一度追加';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'これはあなたです';
|
||||
|
||||
@@ -5695,6 +5739,12 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'パネルを展開';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'ホップ一覧を広げる';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => '地図を表示';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => '位置情報なし';
|
||||
|
||||
|
||||
@@ -1212,33 +1212,6 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_autoRouteRotationDisabled => '자동 경로 순환 기능 비활성화';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => '최대 경로 가중치';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'한 경로가 성공적인 전송을 통해 누적할 수 있는 최대 가중치';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => '초기 경로 가중치';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle => '새로 발견된 경로의 초기 가중치';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement => '성공 시 증가';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'성공적으로 전송된 경로에 추가되는 가중치';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement => '실패 시 감소';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'전송 실패 후 경로에서 제거되는 가중치';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries => '최대 메시지 재시도 횟수';
|
||||
|
||||
@@ -1970,6 +1943,9 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get chatSearch_noResultsHint => '다른 단어를 입력하거나 철자를 확인해 보세요';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => '채팅에서 해당 메시지를 찾을 수 없습니다';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => '메시지를 보내기';
|
||||
|
||||
@@ -2015,6 +1991,63 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => '메시지가 삭제되었습니다.';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => '메시지 선택';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count개 선택됨';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => '모두 선택';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => '선택 해제';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => '메시지를 삭제하시겠습니까?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '이 기기에서 메시지 $count개를 삭제하시겠습니까?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '메시지 $count개를 삭제했습니다',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '메시지 $count개를 스팸으로 표시했습니다',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '메시지 $count개를 스팸 아님으로 표시했습니다',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => '재시도 메시지';
|
||||
|
||||
@@ -2247,6 +2280,9 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => '수동';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => '직접';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'가장 잘 알려진 경로를 자동으로 선택하고, 경로가 없으면 플러딩으로 전환합니다.';
|
||||
@@ -2258,6 +2294,10 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManualHint => '항상 지정한 정확한 경로를 따릅니다.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'중계기를 거치지 않고 항상 이 연락처로 바로 보냅니다. 상대가 무선 범위 안에 있을 때 사용하세요.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => '현재 경로';
|
||||
|
||||
@@ -2422,6 +2462,9 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => '저장됨';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => '다시 추가';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => '본인입니다';
|
||||
|
||||
@@ -5705,6 +5748,12 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => '패널 펼치기';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => '중계 목록 펼치기';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => '지도 보기';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => '위치 없음';
|
||||
|
||||
|
||||
@@ -1268,36 +1268,6 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Automatische route rotatie is uitgeschakeld';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Maximaal routegewicht';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Het maximale gewicht dat een route kan bereiken door succesvolle leveringen.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Initieel routegewicht';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Startgewicht voor nieuwe, ontdekte routes';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Gewichtstoename bij succes';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Gewicht wordt toegevoegd aan een route na een succesvolle levering.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Gewichtsafname bij mislukking';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Gewicht verwijderd van een pad na een mislukte levering';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries => 'Max. aantal nieuwe pogingen';
|
||||
|
||||
@@ -2058,6 +2028,9 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Probeer een ander woord of controleer de spelling';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'Dat bericht is niet gevonden in de chat';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Verzend bericht';
|
||||
|
||||
@@ -2103,6 +2076,67 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Bericht verwijderd';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Berichten selecteren';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count geselecteerd';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Alles selecteren';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Selectie wissen';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Berichten verwijderen?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count berichten van dit apparaat verwijderen?',
|
||||
one: '1 bericht van dit apparaat verwijderen?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count berichten verwijderd',
|
||||
one: '1 bericht verwijderd',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count berichten gemarkeerd als spam',
|
||||
one: '1 bericht gemarkeerd als spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count berichten gemarkeerd als geen spam',
|
||||
one: '1 bericht gemarkeerd als geen spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Bericht opnieuw verzenden';
|
||||
|
||||
@@ -2341,6 +2375,9 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Handmatig';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Direct';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Kiest automatisch het beste bekende pad en gebruikt flood als er geen bekend is.';
|
||||
@@ -2353,6 +2390,10 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Verstuurt altijd via het exacte pad dat je hebt ingesteld.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Verstuurt altijd rechtstreeks naar dit contact, zonder repeater-hops. Gebruik dit als diegene binnen radiobereik is.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Huidige route';
|
||||
|
||||
@@ -2521,6 +2562,9 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Opgeslagen';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Opnieuw toevoegen';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Dit ben jij';
|
||||
|
||||
@@ -5952,6 +5996,12 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Paneel uitklappen';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Hoplijst uitklappen';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Kaart tonen';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Geen locatie';
|
||||
|
||||
|
||||
@@ -1281,36 +1281,6 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Automatyczne obracanie tras wyłączone';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight =>
|
||||
'Maksymalny dopuszczalny ciężar pojazdu';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Maksymalna waga, jaką ścieżka może zgromadzić dzięki udanym dostawom.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Początkowa waga trasy';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Początkowa waga dla nowych, odkrytych ścieżek';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement => 'Wzrost wagi sukcesu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Waga dodana do ścieżki po pomyślnym dostarczeniu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Zmniejszenie wagi kary';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Waga usunięta z trasy po nieudanej dostawie';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Maksymalna liczba prób wysłania wiadomości';
|
||||
@@ -2085,6 +2055,9 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Spróbuj innego słowa lub sprawdź pisownię';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'Nie znaleziono tej wiadomości w czacie';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Wyślij wiadomość';
|
||||
|
||||
@@ -2131,6 +2104,75 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Wiadomość usunięta';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Wybierz wiadomości';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return 'Wybrano: $count';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Zaznacz wszystko';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Wyczyść zaznaczenie';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Usunąć wiadomości?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Usunąć $count wiadomości z tego urządzenia?',
|
||||
many: 'Usunąć $count wiadomości z tego urządzenia?',
|
||||
few: 'Usunąć $count wiadomości z tego urządzenia?',
|
||||
one: 'Usunąć 1 wiadomość z tego urządzenia?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Usunięto $count wiadomości',
|
||||
many: 'Usunięto $count wiadomości',
|
||||
few: 'Usunięto $count wiadomości',
|
||||
one: 'Usunięto 1 wiadomość',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Oznaczono $count wiadomości jako spam',
|
||||
many: 'Oznaczono $count wiadomości jako spam',
|
||||
few: 'Oznaczono $count wiadomości jako spam',
|
||||
one: 'Oznaczono 1 wiadomość jako spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Oznaczono $count wiadomości jako nie spam',
|
||||
many: 'Oznaczono $count wiadomości jako nie spam',
|
||||
few: 'Oznaczono $count wiadomości jako nie spam',
|
||||
one: 'Oznaczono 1 wiadomość jako nie spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Ponawianie wiadomości';
|
||||
|
||||
@@ -2363,13 +2405,16 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get routing_title => 'Planowanie tras';
|
||||
|
||||
@override
|
||||
String get routing_modeAuto => 'Samochód';
|
||||
String get routing_modeAuto => 'Auto';
|
||||
|
||||
@override
|
||||
String get routing_modeFlood => 'Flood';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => 'Instrukcja obsługi';
|
||||
String get routing_modeManual => 'Ręcznie';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Bezpośrednio';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
@@ -2383,6 +2428,10 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Zawsze prowadzi dokładnie po trasie, którą określiłeś.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Zawsze wysyła prosto do tego kontaktu, bez przeskoków przez repeatery. Użyj, gdy kontakt jest w zasięgu radia.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Obecna trasa';
|
||||
|
||||
@@ -2555,6 +2604,9 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Zapisano';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Dodaj ponownie';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'To Ty';
|
||||
|
||||
@@ -6017,6 +6069,12 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Rozwiń panel';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Rozwiń listę przeskoków';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Pokaż mapę';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Brak lokalizacji';
|
||||
|
||||
|
||||
@@ -1272,36 +1272,6 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Rotação de roteamento automático desativada';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Peso Máximo da Rota';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Peso máximo que um determinado percurso pode acumular com entregas bem-sucedidas.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Peso Inicial da Rota';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Peso inicial para novos caminhos descobertos';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Aumento do peso para indicar sucesso';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Peso adicionado a um caminho após a entrega bem-sucedida.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Redução do peso da falha';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Peso removido de um caminho após uma tentativa de entrega malsucedida.';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Número máximo de tentativas de envio de mensagens';
|
||||
@@ -2065,6 +2035,10 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Tente outra palavra ou verifique a ortografia';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Não foi possível encontrar essa mensagem na conversa';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Enviar mensagem';
|
||||
|
||||
@@ -2110,6 +2084,67 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Mensagem excluída';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Selecionar mensagens';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count selecionadas';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Selecionar tudo';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Limpar seleção';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Excluir mensagens?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Excluir $count mensagens deste dispositivo?',
|
||||
one: 'Excluir 1 mensagem deste dispositivo?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count mensagens excluídas',
|
||||
one: '1 mensagem excluída',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count mensagens marcadas como spam',
|
||||
one: '1 mensagem marcada como spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count mensagens marcadas como não spam',
|
||||
one: '1 mensagem marcada como não spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Tentando novamente';
|
||||
|
||||
@@ -2339,7 +2374,7 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get routing_title => 'Rotas';
|
||||
|
||||
@override
|
||||
String get routing_modeAuto => 'Carro';
|
||||
String get routing_modeAuto => 'Automático';
|
||||
|
||||
@override
|
||||
String get routing_modeFlood => 'Inundação';
|
||||
@@ -2347,6 +2382,9 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Manual';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Direto';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Seleciona automaticamente o caminho mais conhecido, e, se nenhum caminho conhecido for encontrado, utiliza a estratégia de \"inundação\".';
|
||||
@@ -2359,6 +2397,10 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Sempre segue exatamente o caminho que você define.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Envia sempre diretamente a este contato, sem saltos de repetidor. Use quando ele estiver ao alcance do rádio.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Rota atual';
|
||||
|
||||
@@ -2530,6 +2572,9 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Salvo';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Adicionar novamente';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Este é você';
|
||||
|
||||
@@ -5978,6 +6023,12 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Expandir painel';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Expandir lista de saltos';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Mostrar mapa';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Sem localização';
|
||||
|
||||
|
||||
@@ -1276,37 +1276,6 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Автоматическое переключение маршрутов отключено';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight =>
|
||||
'Максимальный допустимый вес маршрута';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Максимальный вес, который может быть перевезён по определённому маршруту при успешных доставках.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Начальный вес маршрута';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Начальный вес для новых, только что открытых маршрутов';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Увеличение веса успеха';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Вес, добавленный к маршруту после успешной доставки.';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Уменьшение веса неудачи';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Вес, который был удален с пути после неудачной доставки.';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Максимальное количество повторных попыток отправки сообщения';
|
||||
@@ -2071,6 +2040,9 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Попробуйте другое слово или проверьте написание';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'Не удалось найти это сообщение в чате';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Отправить сообщение';
|
||||
|
||||
@@ -2116,6 +2088,75 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Сообщение удалено';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Выбрать сообщения';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return 'Выбрано: $count';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Выбрать все';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Снять выделение';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Удалить сообщения?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Удалить $count сообщения с этого устройства?',
|
||||
many: 'Удалить $count сообщений с этого устройства?',
|
||||
few: 'Удалить $count сообщения с этого устройства?',
|
||||
one: 'Удалить $count сообщение с этого устройства?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count сообщения удалено',
|
||||
many: '$count сообщений удалено',
|
||||
few: '$count сообщения удалено',
|
||||
one: '$count сообщение удалено',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count сообщения отмечено как спам',
|
||||
many: '$count сообщений отмечено как спам',
|
||||
few: '$count сообщения отмечено как спам',
|
||||
one: '$count сообщение отмечено как спам',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count сообщения отмечено как не спам',
|
||||
many: '$count сообщений отмечено как не спам',
|
||||
few: '$count сообщения отмечено как не спам',
|
||||
one: '$count сообщение отмечено как не спам',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Повтор отправки сообщения';
|
||||
|
||||
@@ -2353,7 +2394,10 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get routing_modeFlood => 'Рассылка';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => 'Инструкция';
|
||||
String get routing_modeManual => 'Вручную';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Прямой';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
@@ -2367,6 +2411,10 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Всегда следует точно по указанному вами маршруту.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Всегда отправляет напрямую этому контакту, без промежуточных ретрансляторов. Используйте, если он в зоне радиосвязи.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Текущий маршрут';
|
||||
|
||||
@@ -2539,6 +2587,9 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Сохранён';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Добавить снова';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Это вы';
|
||||
|
||||
@@ -6000,6 +6051,12 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Расширить панель';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Развернуть список ретрансляторов';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Показать карту';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Нет координат';
|
||||
|
||||
|
||||
@@ -1269,35 +1269,6 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Automatické striedanie trás je vypnuté';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Maximálna váha trasy';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Maximálna váha, ktorú môže cesta nazbierať z úspešných doručení';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Počiatočná váha trasy';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Počiatočná váha pre nové, objavené cesty';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement => 'Zvyšenie váhy úspechu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Váha pridaná k ceste po úspešnom doručení';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Zníženie váhy pri neúspechu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Váha odobraná z cesty po neúspešnom doručení';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Maximálny počet pokusov o odoslanie správy';
|
||||
@@ -2063,6 +2034,9 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Skúste iné slovo alebo skontrolujte preklepy';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => 'Túto správu sa v chate nepodarilo nájsť';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Odoslať správu';
|
||||
|
||||
@@ -2106,7 +2080,76 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get chat_messageCopied => 'Správa skopírovaná';
|
||||
|
||||
@override
|
||||
String get chat_messageDeleted => 'Posolstvo odstránené';
|
||||
String get chat_messageDeleted => 'Správa odstránená';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Vybrať správy';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return 'Vybrané: $count';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Vybrať všetko';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Zrušiť výber';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Odstrániť správy?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Odstrániť $count správ z tohto zariadenia?',
|
||||
many: 'Odstrániť $count správy z tohto zariadenia?',
|
||||
few: 'Odstrániť $count správy z tohto zariadenia?',
|
||||
one: 'Odstrániť $count správu z tohto zariadenia?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count správ odstránených',
|
||||
many: '$count správy odstránené',
|
||||
few: '$count správy odstránené',
|
||||
one: '$count správa odstránená',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count správ označených ako spam',
|
||||
many: '$count správy označené ako spam',
|
||||
few: '$count správy označené ako spam',
|
||||
one: '$count správa označená ako spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count správ označených ako nie spam',
|
||||
many: '$count správy označené ako nie spam',
|
||||
few: '$count správy označené ako nie spam',
|
||||
one: '$count správa označená ako nie spam',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Pokus o obnovenie';
|
||||
@@ -2344,7 +2387,10 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get routing_modeFlood => 'Flood';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => 'Ručná príručka';
|
||||
String get routing_modeManual => 'Ručne';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Priamo';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
@@ -2358,6 +2404,10 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Vždy dodáva presne podľa zadaného trasy.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Vždy odosiela priamo tomuto kontaktu, bez prechodov cez opakovače. Použite, ak je v dosahu rádia.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Aktuálna trasa';
|
||||
|
||||
@@ -2530,6 +2580,9 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Uložené';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Pridať znova';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Toto ste vy';
|
||||
|
||||
@@ -5971,6 +6024,12 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Rozbaliť panel';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Rozbaliť zoznam opakovačov';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Zobraziť mapu';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Bez polohy';
|
||||
|
||||
|
||||
@@ -1266,36 +1266,6 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Samodejno kroženje poti onemogočeno';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Največja dovoljena teža poti';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Največja teža, ki jo pot lahko nabere z uspešnimi dostavami';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Začetna teža poti';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Začetna teža novo odkritih poti';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Povečanje teže ob uspehu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Teža, dodana poti po uspešni dostavi';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Zmanjšanje teže ob neuspehu';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Teža, odstranjena s poti po neuspešni dostavi';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Največ poskusov pošiljanja sporočila';
|
||||
@@ -2059,6 +2029,10 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Poskusite z drugo besedo ali preverite črkovanje';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Sporočila ni bilo mogoče najti v klepetu';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Pošlji sporočilo';
|
||||
|
||||
@@ -2105,6 +2079,75 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Sporočilo izbrisano';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Izberi sporočila';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return 'Izbrano: $count';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Izberi vse';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Počisti izbiro';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Izbrisati sporočila?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Želite izbrisati $count sporočil iz te naprave?',
|
||||
few: 'Želite izbrisati $count sporočila iz te naprave?',
|
||||
two: 'Želite izbrisati $count sporočili iz te naprave?',
|
||||
one: 'Želite izbrisati $count sporočilo iz te naprave?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count sporočil izbrisanih',
|
||||
few: '$count sporočila izbrisana',
|
||||
two: '$count sporočili izbrisani',
|
||||
one: '$count sporočilo izbrisano',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count sporočil označenih kot neželeno',
|
||||
few: '$count sporočila označena kot neželeno',
|
||||
two: '$count sporočili označeni kot neželeno',
|
||||
one: '$count sporočilo označeno kot neželeno',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count sporočil označenih kot ni neželeno',
|
||||
few: '$count sporočila označena kot ni neželeno',
|
||||
two: '$count sporočili označeni kot ni neželeno',
|
||||
one: '$count sporočilo označeno kot ni neželeno',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Ponovni poskus.';
|
||||
|
||||
@@ -2334,13 +2377,16 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get routing_title => 'Navigacija';
|
||||
|
||||
@override
|
||||
String get routing_modeAuto => 'Avto';
|
||||
String get routing_modeAuto => 'Samodejno';
|
||||
|
||||
@override
|
||||
String get routing_modeFlood => 'Flood';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => 'Navodilo';
|
||||
String get routing_modeManual => 'Ročno';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Neposredno';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
@@ -2354,6 +2400,10 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Vedno sledi natančni poti, ki jo ste določili.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Vedno pošlje neposredno temu stiku, brez skokov prek repetitorjev. Uporabite, če je v radijskem dosegu.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Trenutna pot';
|
||||
|
||||
@@ -2521,6 +2571,9 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Shranjeno';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Dodaj znova';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'To ste vi';
|
||||
|
||||
@@ -5959,6 +6012,12 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Razširi ploščo';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Razširi seznam repetitorjev';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Pokaži zemljevid';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Brez lokacije';
|
||||
|
||||
|
||||
@@ -1254,36 +1254,6 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Automatisk ruttrotation är avstängd';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Maximal ruttvikt';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Maximal vikt som en rutt kan samla efter lyckade leveranser';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Initial vikt för rutt';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Startvikt för nyligen upptäckta rutter';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Ökning av vikt för framgång';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Vikt som läggs till en rutt efter en lyckad leverans';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Minskning av vikten för misslyckande';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Vikt som tas bort från en rutt efter en misslyckad leverans';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries => 'Maximalt antal försök';
|
||||
|
||||
@@ -2042,6 +2012,10 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Prova ett annat ord eller kontrollera stavningen';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Det gick inte att hitta meddelandet i chatten';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Skicka meddelande';
|
||||
|
||||
@@ -2089,6 +2063,67 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Meddelandet raderat';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Markera meddelanden';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '$count markerade';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Markera alla';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Rensa markering';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Radera meddelanden?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Radera $count meddelanden från den här enheten?',
|
||||
one: 'Radera 1 meddelande från den här enheten?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count meddelanden raderade',
|
||||
one: '1 meddelande raderat',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count meddelanden markerade som skräppost',
|
||||
one: '1 meddelande markerat som skräppost',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count meddelanden markerade som inte skräppost',
|
||||
one: '1 meddelande markerat som inte skräppost',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Försöker igen';
|
||||
|
||||
@@ -2326,6 +2361,9 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManual => 'Manuell';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Direkt';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Väljer automatiskt den bästa kända rutten och använder flood när ingen rutt är känd.';
|
||||
@@ -2338,6 +2376,10 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Skickar alltid längs exakt den rutt du anger.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Skickar alltid direkt till den här kontakten utan repeaterhopp. Använd när kontakten är inom radioräckvidd.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Nuvarande rutt';
|
||||
|
||||
@@ -2506,6 +2548,9 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Sparad';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Lägg till igen';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Det här är du';
|
||||
|
||||
@@ -5932,6 +5977,12 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Expandera panel';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Expandera hopplistan';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Visa karta';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Ingen position';
|
||||
|
||||
|
||||
@@ -1268,36 +1268,6 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get appSettings_autoRouteRotationDisabled =>
|
||||
'Авторотація маршрутизації вимкнена';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => 'Максимальна вага маршруту';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle =>
|
||||
'Максимальна вага, яку може накопичити маршрут завдяки успішним доставкам.';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => 'Початкова вартість маршруту';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle =>
|
||||
'Початкова вага для нових відкритих шляхів';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement =>
|
||||
'Збільшення ваги успіху';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'Вага, додана до маршруту після успішної доставки';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement =>
|
||||
'Зменшення ваги помилки';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'Вага, яка була знята з маршруту після невдалої доставки';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries =>
|
||||
'Максимальна кількість повторних спроб надсилання повідомлення';
|
||||
@@ -2062,6 +2032,10 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get chatSearch_noResultsHint =>
|
||||
'Спробуйте інше слово або перевірте написання';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed =>
|
||||
'Не вдалося знайти це повідомлення в чаті';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => 'Надіслати повідомлення';
|
||||
|
||||
@@ -2108,6 +2082,75 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => 'Повідомлення видалено';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => 'Вибрати повідомлення';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return 'Вибрано: $count';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => 'Вибрати все';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => 'Скасувати вибір';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => 'Видалити повідомлення?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Видалити $count повідомлення з цього пристрою?',
|
||||
many: 'Видалити $count повідомлень з цього пристрою?',
|
||||
few: 'Видалити $count повідомлення з цього пристрою?',
|
||||
one: 'Видалити $count повідомлення з цього пристрою?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count повідомлення видалено',
|
||||
many: '$count повідомлень видалено',
|
||||
few: '$count повідомлення видалено',
|
||||
one: '$count повідомлення видалено',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count повідомлення позначено як спам',
|
||||
many: '$count повідомлень позначено як спам',
|
||||
few: '$count повідомлення позначено як спам',
|
||||
one: '$count повідомлення позначено як спам',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count повідомлення позначено як не спам',
|
||||
many: '$count повідомлень позначено як не спам',
|
||||
few: '$count повідомлення позначено як не спам',
|
||||
one: '$count повідомлення позначено як не спам',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => 'Спроба відновлення.';
|
||||
|
||||
@@ -2340,13 +2383,16 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get routing_title => 'Маршрутизація';
|
||||
|
||||
@override
|
||||
String get routing_modeAuto => 'Автомобіль';
|
||||
String get routing_modeAuto => 'Авто';
|
||||
|
||||
@override
|
||||
String get routing_modeFlood => 'Через всю мережу';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => 'Інструкція';
|
||||
String get routing_modeManual => 'Вручну';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => 'Напряму';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
@@ -2360,6 +2406,10 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get routing_modeManualHint =>
|
||||
'Завжди доставляє точно за вказаним вами маршрутом.';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint =>
|
||||
'Завжди надсилає напряму цьому контакту, без проміжних ретрансляторів. Використовуйте, якщо він у зоні радіозв\'язку.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Поточний маршрут';
|
||||
|
||||
@@ -2531,6 +2581,9 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => 'Збережено';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => 'Додати знову';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => 'Це ви';
|
||||
|
||||
@@ -6004,6 +6057,12 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => 'Розгорнути панель';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => 'Розгорнути список ретрансляторів';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => 'Показати карту';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => 'Без геопозиції';
|
||||
|
||||
|
||||
@@ -1191,32 +1191,6 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_autoRouteRotationDisabled => '自动路径轮换已禁用';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeight => '最大路径重量';
|
||||
|
||||
@override
|
||||
String get appSettings_maxRouteWeightSubtitle => '一条路径可以累积的最大重量,取决于成功交付的数量。';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeight => '初始路线权重';
|
||||
|
||||
@override
|
||||
String get appSettings_initialRouteWeightSubtitle => '新发现路径的初始重量';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrement => '成功权重增加';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightSuccessIncrementSubtitle =>
|
||||
'在成功交付后,将重量添加到路径中';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrement => '失败权重降低';
|
||||
|
||||
@override
|
||||
String get appSettings_routeWeightFailureDecrementSubtitle =>
|
||||
'从一条路径上移除的货物,由于无法成功交付而移除。';
|
||||
|
||||
@override
|
||||
String get appSettings_maxMessageRetries => '最大消息重试次数';
|
||||
|
||||
@@ -1944,6 +1918,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get chatSearch_noResultsHint => '请尝试其他词语或检查拼写';
|
||||
|
||||
@override
|
||||
String get chatSearch_jumpFailed => '在聊天中找不到该消息';
|
||||
|
||||
@override
|
||||
String get chat_sendMessage => '发送消息';
|
||||
|
||||
@@ -1988,6 +1965,63 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get chat_messageDeleted => '消息已删除';
|
||||
|
||||
@override
|
||||
String get chat_selectMessages => '选择消息';
|
||||
|
||||
@override
|
||||
String chat_selectedCount(int count) {
|
||||
return '已选择 $count 项';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_selectAll => '全选';
|
||||
|
||||
@override
|
||||
String get chat_clearSelection => '取消选择';
|
||||
|
||||
@override
|
||||
String get chat_deleteSelectedTitle => '删除消息?';
|
||||
|
||||
@override
|
||||
String chat_deleteSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '要从此设备删除 $count 条消息吗?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String chat_messagesDeleted(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '已删除 $count 条消息',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '已将 $count 条消息标记为垃圾消息',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String messageFilter_markedNotSpamCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '已将 $count 条消息标记为非垃圾消息',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_retryingMessage => '正在重试消息';
|
||||
|
||||
@@ -2203,13 +2237,16 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
String get routing_title => '路由';
|
||||
|
||||
@override
|
||||
String get routing_modeAuto => '汽车';
|
||||
String get routing_modeAuto => '自动';
|
||||
|
||||
@override
|
||||
String get routing_modeFlood => '泛洪';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => '手册';
|
||||
String get routing_modeManual => '手动';
|
||||
|
||||
@override
|
||||
String get routing_modeDirect => '直连';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint => '自动选择已知最佳路径,当没有已知路径时,则进行“泛洪”搜索。';
|
||||
@@ -2220,6 +2257,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get routing_modeManualHint => '总是按照您设置的路径进行导航。';
|
||||
|
||||
@override
|
||||
String get routing_modeDirectHint => '始终直接发送给该联系人,不经过中继跳。在对方处于无线电范围内时使用。';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => '当前路线';
|
||||
|
||||
@@ -2384,6 +2424,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get contactShare_saved => '已保存';
|
||||
|
||||
@override
|
||||
String get contactShare_addAgain => '重新添加';
|
||||
|
||||
@override
|
||||
String get contactShare_isYou => '这是你自己';
|
||||
|
||||
@@ -5559,6 +5602,12 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get pathMap_expandPanel => '展开面板';
|
||||
|
||||
@override
|
||||
String get pathMap_expandHopList => '展开中继列表';
|
||||
|
||||
@override
|
||||
String get pathMap_showMap => '显示地图';
|
||||
|
||||
@override
|
||||
String get pathMap_noLocation => '无位置';
|
||||
|
||||
|
||||
+51
-9
@@ -2276,14 +2276,6 @@
|
||||
"contact_lastSeen": "Laatst gezien",
|
||||
"contact_clearChat": "Chat leegmaken",
|
||||
"contact_teleBaseSubtitle": "Delen van batterijniveau en basistelemetrie toestaan",
|
||||
"appSettings_maxRouteWeightSubtitle": "Het maximale gewicht dat een route kan bereiken door succesvolle leveringen.",
|
||||
"appSettings_initialRouteWeight": "Initieel routegewicht",
|
||||
"appSettings_maxRouteWeight": "Maximaal routegewicht",
|
||||
"appSettings_initialRouteWeightSubtitle": "Startgewicht voor nieuwe, ontdekte routes",
|
||||
"appSettings_routeWeightSuccessIncrement": "Gewichtstoename bij succes",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Gewicht wordt toegevoegd aan een route na een succesvolle levering.",
|
||||
"appSettings_routeWeightFailureDecrement": "Gewichtsafname bij mislukking",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Gewicht verwijderd van een pad na een mislukte levering",
|
||||
"appSettings_maxMessageRetries": "Max. aantal nieuwe pogingen",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Aantal pogingen om een bericht opnieuw te versturen voordat het als mislukt wordt gemarkeerd",
|
||||
"appSettings_ipfsImageLinks": "IPFS-providerconfiguratie",
|
||||
@@ -3569,5 +3561,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Dat bericht is niet gevonden in de chat",
|
||||
"chat_clearSelection": "Selectie wissen",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, =1{1 bericht van dit apparaat verwijderen?} other{{count} berichten van dit apparaat verwijderen?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Berichten verwijderen?",
|
||||
"chat_messagesDeleted": "{count, plural, =1{1 bericht verwijderd} other{{count} berichten verwijderd}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Alles selecteren",
|
||||
"chat_selectMessages": "Berichten selecteren",
|
||||
"chat_selectedCount": "{count} geselecteerd",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Opnieuw toevoegen",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, =1{1 bericht gemarkeerd als geen spam} other{{count} berichten gemarkeerd als geen spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, =1{1 bericht gemarkeerd als spam} other{{count} berichten gemarkeerd als spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Hoplijst uitklappen",
|
||||
"pathMap_showMap": "Kaart tonen",
|
||||
"routing_modeDirect": "Direct",
|
||||
"routing_modeDirectHint": "Verstuurt altijd rechtstreeks naar dit contact, zonder repeater-hops. Gebruik dit als diegene binnen radiobereik is."
|
||||
}
|
||||
+53
-11
@@ -2271,14 +2271,6 @@
|
||||
"contact_settings": "Ustawienia kontaktowe",
|
||||
"contact_lastSeen": "Ostatnio widziany",
|
||||
"contact_teleBaseSubtitle": "Pozwól na udostępnianie poziomu naładowania baterii i podstawowych danych telemetrycznych",
|
||||
"appSettings_initialRouteWeight": "Początkowa waga trasy",
|
||||
"appSettings_maxRouteWeight": "Maksymalny dopuszczalny ciężar pojazdu",
|
||||
"appSettings_initialRouteWeightSubtitle": "Początkowa waga dla nowych, odkrytych ścieżek",
|
||||
"appSettings_maxRouteWeightSubtitle": "Maksymalna waga, jaką ścieżka może zgromadzić dzięki udanym dostawom.",
|
||||
"appSettings_routeWeightSuccessIncrement": "Wzrost wagi sukcesu",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Waga dodana do ścieżki po pomyślnym dostarczeniu",
|
||||
"appSettings_routeWeightFailureDecrement": "Zmniejszenie wagi kary",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Waga usunięta z trasy po nieudanej dostawie",
|
||||
"appSettings_maxMessageRetries": "Maksymalna liczba prób wysłania wiadomości",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Liczba prób ponownego wysłania wiadomości przed oznaczaniem jej jako nieudanej",
|
||||
"appSettings_ipfsImageLinks": "Konfiguracja dostawcy IPFS",
|
||||
@@ -2636,9 +2628,9 @@
|
||||
"contacts_searchOpen": "Wyszukaj kontakty",
|
||||
"contacts_searchClose": "Zaawansowane wyszukiwanie",
|
||||
"routing_title": "Planowanie tras",
|
||||
"routing_modeAuto": "Samochód",
|
||||
"routing_modeAuto": "Auto",
|
||||
"routing_modeFlood": "Flood",
|
||||
"routing_modeManual": "Instrukcja obsługi",
|
||||
"routing_modeManual": "Ręcznie",
|
||||
"routing_modeAutoHint": "Automatycznie wybiera najpopularniejszą ścieżkę, a w przypadku braku znanej, przechodzi do trybu \"przepływu\".",
|
||||
"routing_modeFloodHint": "Transmisje za pośrednictwem każdego repeatera. Najbardziej niezawodna metoda, ale zużywa więcej czasu transmisji.",
|
||||
"routing_modeManualHint": "Zawsze prowadzi dokładnie po trasie, którą określiłeś.",
|
||||
@@ -3907,5 +3899,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Nie znaleziono tej wiadomości w czacie",
|
||||
"chat_clearSelection": "Wyczyść zaznaczenie",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Usunąć 1 wiadomość z tego urządzenia?} few{Usunąć {count} wiadomości z tego urządzenia?} many{Usunąć {count} wiadomości z tego urządzenia?} other{Usunąć {count} wiadomości z tego urządzenia?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Usunąć wiadomości?",
|
||||
"chat_messagesDeleted": "{count, plural, one{Usunięto 1 wiadomość} few{Usunięto {count} wiadomości} many{Usunięto {count} wiadomości} other{Usunięto {count} wiadomości}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Zaznacz wszystko",
|
||||
"chat_selectMessages": "Wybierz wiadomości",
|
||||
"chat_selectedCount": "Wybrano: {count}",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Dodaj ponownie",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{Oznaczono 1 wiadomość jako nie spam} few{Oznaczono {count} wiadomości jako nie spam} many{Oznaczono {count} wiadomości jako nie spam} other{Oznaczono {count} wiadomości jako nie spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{Oznaczono 1 wiadomość jako spam} few{Oznaczono {count} wiadomości jako spam} many{Oznaczono {count} wiadomości jako spam} other{Oznaczono {count} wiadomości jako spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Rozwiń listę przeskoków",
|
||||
"pathMap_showMap": "Pokaż mapę",
|
||||
"routing_modeDirect": "Bezpośrednio",
|
||||
"routing_modeDirectHint": "Zawsze wysyła prosto do tego kontaktu, bez przeskoków przez repeatery. Użyj, gdy kontakt jest w zasięgu radia."
|
||||
}
|
||||
+52
-10
@@ -2164,14 +2164,6 @@
|
||||
"contact_telemetry": "Telemetria",
|
||||
"contact_settings": "Configurações de Contato",
|
||||
"contact_teleBaseSubtitle": "Permitir compartilhamento do nível da bateria e telemetria básica",
|
||||
"appSettings_initialRouteWeight": "Peso Inicial da Rota",
|
||||
"appSettings_maxRouteWeight": "Peso Máximo da Rota",
|
||||
"appSettings_maxRouteWeightSubtitle": "Peso máximo que um determinado percurso pode acumular com entregas bem-sucedidas.",
|
||||
"appSettings_initialRouteWeightSubtitle": "Peso inicial para novos caminhos descobertos",
|
||||
"appSettings_routeWeightSuccessIncrement": "Aumento do peso para indicar sucesso",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Peso adicionado a um caminho após a entrega bem-sucedida.",
|
||||
"appSettings_routeWeightFailureDecrement": "Redução do peso da falha",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Peso removido de um caminho após uma tentativa de entrega malsucedida.",
|
||||
"appSettings_maxMessageRetries": "Número máximo de tentativas de envio de mensagens",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Número de tentativas de reenvio antes de classificar uma mensagem como falha.",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -2519,7 +2511,7 @@
|
||||
"contacts_searchOpen": "Pesquisar contatos",
|
||||
"contacts_searchClose": "Pesquisa avançada",
|
||||
"routing_title": "Rotas",
|
||||
"routing_modeAuto": "Carro",
|
||||
"routing_modeAuto": "Automático",
|
||||
"routing_modeFlood": "Inundação",
|
||||
"routing_modeManual": "Manual",
|
||||
"routing_modeAutoHint": "Seleciona automaticamente o caminho mais conhecido, e, se nenhum caminho conhecido for encontrado, utiliza a estratégia de \"inundação\".",
|
||||
@@ -3720,5 +3712,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Não foi possível encontrar essa mensagem na conversa",
|
||||
"chat_clearSelection": "Limpar seleção",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, =1{Excluir 1 mensagem deste dispositivo?} other{Excluir {count} mensagens deste dispositivo?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Excluir mensagens?",
|
||||
"chat_messagesDeleted": "{count, plural, =1{1 mensagem excluída} other{{count} mensagens excluídas}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Selecionar tudo",
|
||||
"chat_selectMessages": "Selecionar mensagens",
|
||||
"chat_selectedCount": "{count} selecionadas",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Adicionar novamente",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, =1{1 mensagem marcada como não spam} other{{count} mensagens marcadas como não spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, =1{1 mensagem marcada como spam} other{{count} mensagens marcadas como spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Expandir lista de saltos",
|
||||
"pathMap_showMap": "Mostrar mapa",
|
||||
"routing_modeDirect": "Direto",
|
||||
"routing_modeDirectHint": "Envia sempre diretamente a este contato, sem saltos de repetidor. Use quando ele estiver ao alcance do rádio."
|
||||
}
|
||||
+52
-10
@@ -1405,14 +1405,6 @@
|
||||
"contact_clearChat": "Очистить чат",
|
||||
"contact_lastSeen": "Последний раз видели",
|
||||
"contact_teleBaseSubtitle": "Разрешить обмен уровнем заряда батареи и базовой телеметрией",
|
||||
"appSettings_maxRouteWeight": "Максимальный допустимый вес маршрута",
|
||||
"appSettings_maxRouteWeightSubtitle": "Максимальный вес, который может быть перевезён по определённому маршруту при успешных доставках.",
|
||||
"appSettings_initialRouteWeightSubtitle": "Начальный вес для новых, только что открытых маршрутов",
|
||||
"appSettings_initialRouteWeight": "Начальный вес маршрута",
|
||||
"appSettings_routeWeightSuccessIncrement": "Увеличение веса успеха",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Вес, добавленный к маршруту после успешной доставки.",
|
||||
"appSettings_routeWeightFailureDecrement": "Уменьшение веса неудачи",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Вес, который был удален с пути после неудачной доставки.",
|
||||
"appSettings_maxMessageRetries": "Максимальное количество повторных попыток отправки сообщения",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Количество попыток повторной отправки сообщения перед тем, как пометить его как неудачное.",
|
||||
"appSettings_ipfsImageLinks": "Настройка провайдера IPFS",
|
||||
@@ -1903,7 +1895,7 @@
|
||||
"routing_title": "Маршрутизация",
|
||||
"routing_modeAuto": "Авто",
|
||||
"routing_modeFlood": "Рассылка",
|
||||
"routing_modeManual": "Инструкция",
|
||||
"routing_modeManual": "Вручную",
|
||||
"routing_modeAutoHint": "Автоматически выбирает наиболее известный путь, и если такой путь неизвестен, использует алгоритм поиска пути.",
|
||||
"routing_modeFloodHint": "Передача сигнала через все ретрансляторы. Самый надежный способ, но требует больше времени на передачу.",
|
||||
"routing_modeManualHint": "Всегда следует точно по указанному вами маршруту.",
|
||||
@@ -2965,5 +2957,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Не удалось найти это сообщение в чате",
|
||||
"chat_clearSelection": "Снять выделение",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Удалить {count} сообщение с этого устройства?} few{Удалить {count} сообщения с этого устройства?} many{Удалить {count} сообщений с этого устройства?} other{Удалить {count} сообщения с этого устройства?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Удалить сообщения?",
|
||||
"chat_messagesDeleted": "{count, plural, one{{count} сообщение удалено} few{{count} сообщения удалено} many{{count} сообщений удалено} other{{count} сообщения удалено}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Выбрать все",
|
||||
"chat_selectMessages": "Выбрать сообщения",
|
||||
"chat_selectedCount": "Выбрано: {count}",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Добавить снова",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{{count} сообщение отмечено как не спам} few{{count} сообщения отмечено как не спам} many{{count} сообщений отмечено как не спам} other{{count} сообщения отмечено как не спам}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{{count} сообщение отмечено как спам} few{{count} сообщения отмечено как спам} many{{count} сообщений отмечено как спам} other{{count} сообщения отмечено как спам}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Развернуть список ретрансляторов",
|
||||
"pathMap_showMap": "Показать карту",
|
||||
"routing_modeDirect": "Прямой",
|
||||
"routing_modeDirectHint": "Всегда отправляет напрямую этому контакту, без промежуточных ретрансляторов. Используйте, если он в зоне радиосвязи."
|
||||
}
|
||||
+53
-11
@@ -487,7 +487,7 @@
|
||||
}
|
||||
},
|
||||
"chat_messageCopied": "Správa skopírovaná",
|
||||
"chat_messageDeleted": "Posolstvo odstránené",
|
||||
"chat_messageDeleted": "Správa odstránená",
|
||||
"chat_retryingMessage": "Pokus o obnovenie",
|
||||
"chat_retryCount": "Skúsiť {current}/{max}",
|
||||
"@chat_retryCount": {
|
||||
@@ -2233,14 +2233,6 @@
|
||||
"contact_lastSeen": "Naposledy videný",
|
||||
"contact_teleBase": "Báza telemetrie",
|
||||
"contact_teleEnvSubtitle": "Povoliť zdieľanie údajov senzorov prostredia",
|
||||
"appSettings_maxRouteWeightSubtitle": "Maximálna váha, ktorú môže cesta nazbierať z úspešných doručení",
|
||||
"appSettings_initialRouteWeightSubtitle": "Počiatočná váha pre nové, objavené cesty",
|
||||
"appSettings_initialRouteWeight": "Počiatočná váha trasy",
|
||||
"appSettings_maxRouteWeight": "Maximálna váha trasy",
|
||||
"appSettings_routeWeightSuccessIncrement": "Zvyšenie váhy úspechu",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Váha pridaná k ceste po úspešnom doručení",
|
||||
"appSettings_routeWeightFailureDecrement": "Zníženie váhy pri neúspechu",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Váha odobraná z cesty po neúspešnom doručení",
|
||||
"appSettings_maxMessageRetries": "Maximálny počet pokusov o odoslanie správy",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Počet opakovaných pokusov pred označením správy ako neúspešnej",
|
||||
"appSettings_ipfsImageLinks": "Konfigurácia poskytovateľa IPFS",
|
||||
@@ -2606,7 +2598,7 @@
|
||||
"routing_title": "Navigácia",
|
||||
"routing_modeAuto": "Auto",
|
||||
"routing_modeFlood": "Flood",
|
||||
"routing_modeManual": "Ručná príručka",
|
||||
"routing_modeManual": "Ručne",
|
||||
"routing_modeAutoHint": "Automaticky vyberá najznámejší trasa, a ak žiadna nie je známa, použije náhodnú trasu.",
|
||||
"routing_modeFloodHint": "Prenos prostredníctvom všetkých opakovačov. Najspoľahlivejší spôsob, ale vyžaduje viac času vysielania.",
|
||||
"routing_modeManualHint": "Vždy dodáva presne podľa zadaného trasy.",
|
||||
@@ -3721,5 +3713,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Túto správu sa v chate nepodarilo nájsť",
|
||||
"chat_clearSelection": "Zrušiť výber",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Odstrániť {count} správu z tohto zariadenia?} few{Odstrániť {count} správy z tohto zariadenia?} many{Odstrániť {count} správy z tohto zariadenia?} other{Odstrániť {count} správ z tohto zariadenia?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Odstrániť správy?",
|
||||
"chat_messagesDeleted": "{count, plural, one{{count} správa odstránená} few{{count} správy odstránené} many{{count} správy odstránené} other{{count} správ odstránených}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Vybrať všetko",
|
||||
"chat_selectMessages": "Vybrať správy",
|
||||
"chat_selectedCount": "Vybrané: {count}",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Pridať znova",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{{count} správa označená ako nie spam} few{{count} správy označené ako nie spam} many{{count} správy označené ako nie spam} other{{count} správ označených ako nie spam}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{{count} správa označená ako spam} few{{count} správy označené ako spam} many{{count} správy označené ako spam} other{{count} správ označených ako spam}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Rozbaliť zoznam opakovačov",
|
||||
"pathMap_showMap": "Zobraziť mapu",
|
||||
"routing_modeDirect": "Priamo",
|
||||
"routing_modeDirectHint": "Vždy odosiela priamo tomuto kontaktu, bez prechodov cez opakovače. Použite, ak je v dosahu rádia."
|
||||
}
|
||||
+53
-11
@@ -2157,14 +2157,6 @@
|
||||
"contact_teleEnv": "Okolje telemetrije",
|
||||
"contact_teleEnvSubtitle": "Dovoli deljenje podatkov okoljskih senzorjev",
|
||||
"contact_teleLocSubtitle": "Dovoli deljenje podatkov o lokaciji",
|
||||
"appSettings_maxRouteWeightSubtitle": "Največja teža, ki jo pot lahko nabere z uspešnimi dostavami",
|
||||
"appSettings_initialRouteWeight": "Začetna teža poti",
|
||||
"appSettings_initialRouteWeightSubtitle": "Začetna teža novo odkritih poti",
|
||||
"appSettings_maxRouteWeight": "Največja dovoljena teža poti",
|
||||
"appSettings_routeWeightSuccessIncrement": "Povečanje teže ob uspehu",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Teža, dodana poti po uspešni dostavi",
|
||||
"appSettings_routeWeightFailureDecrement": "Zmanjšanje teže ob neuspehu",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Teža, odstranjena s poti po neuspešni dostavi",
|
||||
"appSettings_maxMessageRetries": "Največ poskusov pošiljanja sporočila",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Število poskusov ponovnega poslanja, preden se sporočilo označuje kot neuspešno",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -2512,9 +2504,9 @@
|
||||
"contacts_searchOpen": "Iskanje kontaktov",
|
||||
"contacts_searchClose": "Izklopi iskanje",
|
||||
"routing_title": "Navigacija",
|
||||
"routing_modeAuto": "Avto",
|
||||
"routing_modeAuto": "Samodejno",
|
||||
"routing_modeFlood": "Flood",
|
||||
"routing_modeManual": "Navodilo",
|
||||
"routing_modeManual": "Ročno",
|
||||
"routing_modeAutoHint": "Samodejno izbere najbolj poznano pot, in sicer, ko ni na voljo nobena.",
|
||||
"routing_modeFloodHint": "Prenosi preko vseh repetitorjev. Najzanesljivejši način, vendar zahteva več časa.",
|
||||
"routing_modeManualHint": "Vedno sledi natančni poti, ki jo ste določili.",
|
||||
@@ -3875,5 +3867,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Sporočila ni bilo mogoče najti v klepetu",
|
||||
"chat_clearSelection": "Počisti izbiro",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Želite izbrisati {count} sporočilo iz te naprave?} two{Želite izbrisati {count} sporočili iz te naprave?} few{Želite izbrisati {count} sporočila iz te naprave?} other{Želite izbrisati {count} sporočil iz te naprave?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Izbrisati sporočila?",
|
||||
"chat_messagesDeleted": "{count, plural, one{{count} sporočilo izbrisano} two{{count} sporočili izbrisani} few{{count} sporočila izbrisana} other{{count} sporočil izbrisanih}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Izberi vse",
|
||||
"chat_selectMessages": "Izberi sporočila",
|
||||
"chat_selectedCount": "Izbrano: {count}",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Dodaj znova",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{{count} sporočilo označeno kot ni neželeno} two{{count} sporočili označeni kot ni neželeno} few{{count} sporočila označena kot ni neželeno} other{{count} sporočil označenih kot ni neželeno}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{{count} sporočilo označeno kot neželeno} two{{count} sporočili označeni kot neželeno} few{{count} sporočila označena kot neželeno} other{{count} sporočil označenih kot neželeno}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Razširi seznam repetitorjev",
|
||||
"pathMap_showMap": "Pokaži zemljevid",
|
||||
"routing_modeDirect": "Neposredno",
|
||||
"routing_modeDirectHint": "Vedno pošlje neposredno temu stiku, brez skokov prek repetitorjev. Uporabite, če je v radijskem dosegu."
|
||||
}
|
||||
+51
-9
@@ -2158,14 +2158,6 @@
|
||||
"contact_teleBaseSubtitle": "Tillåt delning av batterinivå och grundläggande telemetri",
|
||||
"contact_teleLoc": "Telemetridata plats",
|
||||
"contact_teleLocSubtitle": "Tillåt delning av platsdata",
|
||||
"appSettings_initialRouteWeightSubtitle": "Startvikt för nyligen upptäckta rutter",
|
||||
"appSettings_maxRouteWeight": "Maximal ruttvikt",
|
||||
"appSettings_maxRouteWeightSubtitle": "Maximal vikt som en rutt kan samla efter lyckade leveranser",
|
||||
"appSettings_initialRouteWeight": "Initial vikt för rutt",
|
||||
"appSettings_routeWeightSuccessIncrement": "Ökning av vikt för framgång",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Vikt som läggs till en rutt efter en lyckad leverans",
|
||||
"appSettings_routeWeightFailureDecrement": "Minskning av vikten för misslyckande",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Vikt som tas bort från en rutt efter en misslyckad leverans",
|
||||
"appSettings_maxMessageRetries": "Maximalt antal försök",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Antal försök att skicka om ett meddelande innan det markeras som misslyckat.",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -3715,5 +3707,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Det gick inte att hitta meddelandet i chatten",
|
||||
"chat_clearSelection": "Rensa markering",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, =1{Radera 1 meddelande från den här enheten?} other{Radera {count} meddelanden från den här enheten?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Radera meddelanden?",
|
||||
"chat_messagesDeleted": "{count, plural, =1{1 meddelande raderat} other{{count} meddelanden raderade}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Markera alla",
|
||||
"chat_selectMessages": "Markera meddelanden",
|
||||
"chat_selectedCount": "{count} markerade",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Lägg till igen",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, =1{1 meddelande markerat som inte skräppost} other{{count} meddelanden markerade som inte skräppost}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, =1{1 meddelande markerat som skräppost} other{{count} meddelanden markerade som skräppost}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Expandera hopplistan",
|
||||
"pathMap_showMap": "Visa karta",
|
||||
"routing_modeDirect": "Direkt",
|
||||
"routing_modeDirectHint": "Skickar alltid direkt till den här kontakten utan repeaterhopp. Använd när kontakten är inom radioräckvidd."
|
||||
}
|
||||
+53
-11
@@ -2236,14 +2236,6 @@
|
||||
"contact_lastSeen": "Останній раз бачили",
|
||||
"contact_teleEnv": "Середовище телеметрії",
|
||||
"contact_teleEnvSubtitle": "Дозволити спільний доступ до даних датчиків середовища",
|
||||
"appSettings_initialRouteWeight": "Початкова вартість маршруту",
|
||||
"appSettings_initialRouteWeightSubtitle": "Початкова вага для нових відкритих шляхів",
|
||||
"appSettings_maxRouteWeight": "Максимальна вага маршруту",
|
||||
"appSettings_maxRouteWeightSubtitle": "Максимальна вага, яку може накопичити маршрут завдяки успішним доставкам.",
|
||||
"appSettings_routeWeightSuccessIncrement": "Збільшення ваги успіху",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "Вага, додана до маршруту після успішної доставки",
|
||||
"appSettings_routeWeightFailureDecrement": "Зменшення ваги помилки",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "Вага, яка була знята з маршруту після невдалої доставки",
|
||||
"appSettings_maxMessageRetries": "Максимальна кількість повторних спроб надсилання повідомлення",
|
||||
"appSettings_maxMessageRetriesSubtitle": "Кількість спроб повторного відправлення повідомлення перед тим, як позначити його як невдале",
|
||||
"appSettings_ipfsImageLinks": "Налаштування IPFS-провайдера",
|
||||
@@ -2577,9 +2569,9 @@
|
||||
"contacts_searchOpen": "Пошук контактів",
|
||||
"contacts_searchClose": "Закрити пошук",
|
||||
"routing_title": "Маршрутизація",
|
||||
"routing_modeAuto": "Автомобіль",
|
||||
"routing_modeAuto": "Авто",
|
||||
"routing_modeFlood": "Через всю мережу",
|
||||
"routing_modeManual": "Інструкція",
|
||||
"routing_modeManual": "Вручну",
|
||||
"routing_modeAutoHint": "Автоматично обирає найкращий відомий шлях, а за відсутності відомого шляху використовує режим «через всю мережу» (flood).",
|
||||
"routing_modeFloodHint": "Передавання через усі ретранслятори. Найбільш надійний спосіб, але потребує більше часу.",
|
||||
"routing_modeManualHint": "Завжди доставляє точно за вказаним вами маршрутом.",
|
||||
@@ -3648,5 +3640,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "Не вдалося знайти це повідомлення в чаті",
|
||||
"chat_clearSelection": "Скасувати вибір",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, one{Видалити {count} повідомлення з цього пристрою?} few{Видалити {count} повідомлення з цього пристрою?} many{Видалити {count} повідомлень з цього пристрою?} other{Видалити {count} повідомлення з цього пристрою?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "Видалити повідомлення?",
|
||||
"chat_messagesDeleted": "{count, plural, one{{count} повідомлення видалено} few{{count} повідомлення видалено} many{{count} повідомлень видалено} other{{count} повідомлення видалено}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "Вибрати все",
|
||||
"chat_selectMessages": "Вибрати повідомлення",
|
||||
"chat_selectedCount": "Вибрано: {count}",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "Додати знову",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, one{{count} повідомлення позначено як не спам} few{{count} повідомлення позначено як не спам} many{{count} повідомлень позначено як не спам} other{{count} повідомлення позначено як не спам}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, one{{count} повідомлення позначено як спам} few{{count} повідомлення позначено як спам} many{{count} повідомлень позначено як спам} other{{count} повідомлення позначено як спам}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "Розгорнути список ретрансляторів",
|
||||
"pathMap_showMap": "Показати карту",
|
||||
"routing_modeDirect": "Напряму",
|
||||
"routing_modeDirectHint": "Завжди надсилає напряму цьому контакту, без проміжних ретрансляторів. Використовуйте, якщо він у зоні радіозв'язку."
|
||||
}
|
||||
+53
-11
@@ -2162,14 +2162,6 @@
|
||||
"contact_settings": "联系人设置",
|
||||
"contact_teleLocSubtitle": "允许共享位置数据",
|
||||
"contact_telemetry": "遥测数据",
|
||||
"appSettings_maxRouteWeight": "最大路径重量",
|
||||
"appSettings_initialRouteWeightSubtitle": "新发现路径的初始重量",
|
||||
"appSettings_initialRouteWeight": "初始路线权重",
|
||||
"appSettings_maxRouteWeightSubtitle": "一条路径可以累积的最大重量,取决于成功交付的数量。",
|
||||
"appSettings_routeWeightSuccessIncrement": "成功权重增加",
|
||||
"appSettings_routeWeightSuccessIncrementSubtitle": "在成功交付后,将重量添加到路径中",
|
||||
"appSettings_routeWeightFailureDecrement": "失败权重降低",
|
||||
"appSettings_routeWeightFailureDecrementSubtitle": "从一条路径上移除的货物,由于无法成功交付而移除。",
|
||||
"appSettings_maxMessageRetries": "最大消息重试次数",
|
||||
"appSettings_maxMessageRetriesSubtitle": "在将消息标记为失败之前,允许尝试的次数",
|
||||
"path_routeWeight": "{weight}/{max}",
|
||||
@@ -2517,9 +2509,9 @@
|
||||
"contacts_searchOpen": "搜索联系人",
|
||||
"contacts_searchClose": "高级搜索",
|
||||
"routing_title": "路由",
|
||||
"routing_modeAuto": "汽车",
|
||||
"routing_modeAuto": "自动",
|
||||
"routing_modeFlood": "泛洪",
|
||||
"routing_modeManual": "手册",
|
||||
"routing_modeManual": "手动",
|
||||
"routing_modeAutoHint": "自动选择已知最佳路径,当没有已知路径时,则进行“泛洪”搜索。",
|
||||
"routing_modeFloodHint": "通过所有中继站进行广播。 这种方式最可靠,但占用更多的时间。",
|
||||
"routing_modeManualHint": "总是按照您设置的路径进行导航。",
|
||||
@@ -3725,5 +3717,55 @@
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chatSearch_jumpFailed": "在聊天中找不到该消息",
|
||||
"chat_clearSelection": "取消选择",
|
||||
"chat_deleteSelectedConfirm": "{count, plural, other{要从此设备删除 {count} 条消息吗?}}",
|
||||
"@chat_deleteSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_deleteSelectedTitle": "删除消息?",
|
||||
"chat_messagesDeleted": "{count, plural, other{已删除 {count} 条消息}}",
|
||||
"@chat_messagesDeleted": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_selectAll": "全选",
|
||||
"chat_selectMessages": "选择消息",
|
||||
"chat_selectedCount": "已选择 {count} 项",
|
||||
"@chat_selectedCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactShare_addAgain": "重新添加",
|
||||
"messageFilter_markedNotSpamCount": "{count, plural, other{已将 {count} 条消息标记为非垃圾消息}}",
|
||||
"@messageFilter_markedNotSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageFilter_markedSpamCount": "{count, plural, other{已将 {count} 条消息标记为垃圾消息}}",
|
||||
"@messageFilter_markedSpamCount": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pathMap_expandHopList": "展开中继列表",
|
||||
"pathMap_showMap": "显示地图",
|
||||
"routing_modeDirect": "直连",
|
||||
"routing_modeDirectHint": "始终直接发送给该联系人,不经过中继跳。在对方处于无线电范围内时使用。"
|
||||
}
|
||||
@@ -20,12 +20,14 @@ import 'services/image_codec_service.dart';
|
||||
import 'services/image_codec_settings_store.dart';
|
||||
import 'services/received_image_blob_store_factory.dart';
|
||||
import 'services/received_image_store.dart';
|
||||
import 'services/scroll_capture_service.dart';
|
||||
import 'services/storage_service.dart';
|
||||
import 'services/message_filter/message_filter_service.dart';
|
||||
import 'services/message_retry_service.dart';
|
||||
import 'services/path_history_service.dart';
|
||||
import 'services/app_settings_service.dart';
|
||||
import 'services/network_map/network_map_upload_service.dart';
|
||||
import 'services/notification_navigator.dart';
|
||||
import 'services/notification_service.dart';
|
||||
import 'services/ble_debug_log_service.dart';
|
||||
import 'services/app_debug_log_service.dart';
|
||||
@@ -58,6 +60,8 @@ void main() async {
|
||||
// this mode before Android 10, where the old layout remains.
|
||||
if (PlatformInfo.isAndroid) {
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
// Android's scrolling screenshot ("Capture more") for Flutter lists.
|
||||
ScrollCaptureService.initialize();
|
||||
}
|
||||
|
||||
// Initialize SharedPreferences cache
|
||||
@@ -404,11 +408,19 @@ const Duration _kImageSweepInterval = Duration(seconds: 5);
|
||||
|
||||
class _MeshCoreAppState extends State<MeshCoreApp> with WidgetsBindingObserver {
|
||||
Timer? _imageSweepTimer;
|
||||
final GlobalKey<NavigatorState> _navigatorKey = GlobalKey<NavigatorState>();
|
||||
late final NotificationNavigator _notificationNavigator =
|
||||
NotificationNavigator(
|
||||
navigatorKey: _navigatorKey,
|
||||
connector: widget.connector,
|
||||
notifications: NotificationService(),
|
||||
);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
_notificationNavigator.attach();
|
||||
_imageSweepTimer = Timer.periodic(
|
||||
_kImageSweepInterval,
|
||||
(_) => widget.imageReassembler.evictExpired(),
|
||||
@@ -417,6 +429,7 @@ class _MeshCoreAppState extends State<MeshCoreApp> with WidgetsBindingObserver {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_notificationNavigator.dispose();
|
||||
_imageSweepTimer?.cancel();
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
super.dispose();
|
||||
@@ -488,6 +501,7 @@ class _MeshCoreAppState extends State<MeshCoreApp> with WidgetsBindingObserver {
|
||||
builder: (context, settingsService, child) {
|
||||
final customTheme = settingsService.activeCustomTheme;
|
||||
return MaterialApp(
|
||||
navigatorKey: _navigatorKey,
|
||||
title: 'MeshCore Open',
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: const [
|
||||
|
||||
@@ -8,6 +8,13 @@ class PathRecord {
|
||||
final int failureCount;
|
||||
final double routeWeight;
|
||||
|
||||
/// Deliveries and failures with older results faded out (see
|
||||
/// `routeDecayFactor`), as of [statsAt]. Auto routing samples from these so
|
||||
/// a route that worked last month but fails today loses its rank quickly.
|
||||
final double recentSuccess;
|
||||
final double recentFailure;
|
||||
final DateTime? statsAt;
|
||||
|
||||
PathRecord({
|
||||
required this.hopCount,
|
||||
required this.tripTimeMs,
|
||||
@@ -17,7 +24,21 @@ class PathRecord {
|
||||
required this.successCount,
|
||||
required this.failureCount,
|
||||
this.routeWeight = 1.0,
|
||||
});
|
||||
double? recentSuccess,
|
||||
double? recentFailure,
|
||||
DateTime? statsAt,
|
||||
}) : recentSuccess = recentSuccess ?? _seedRecent(successCount),
|
||||
recentFailure = recentFailure ?? _seedRecent(failureCount),
|
||||
statsAt = statsAt ?? timestamp;
|
||||
|
||||
/// History saved before faded stats existed: start from the lifetime
|
||||
/// counts, capped so years of old results can't outvote new ones.
|
||||
static double _seedRecent(int count) => count.clamp(0, 5).toDouble();
|
||||
|
||||
/// Bytes per hop, derived from the stored path.
|
||||
int get hashWidth => hopCount > 0 && pathBytes.length >= hopCount
|
||||
? (pathBytes.length ~/ hopCount).clamp(1, 4)
|
||||
: 1;
|
||||
|
||||
String get displayText =>
|
||||
'$hopCount ${hopCount == 1 ? 'hop' : 'hops'} - ${(tripTimeMs / 1000).toStringAsFixed(2)}s';
|
||||
@@ -32,6 +53,9 @@ class PathRecord {
|
||||
'success_count': successCount,
|
||||
'failure_count': failureCount,
|
||||
'route_weight': routeWeight,
|
||||
'recent_success': recentSuccess,
|
||||
'recent_failure': recentFailure,
|
||||
'stats_at': statsAt?.toIso8601String(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,6 +72,11 @@ class PathRecord {
|
||||
successCount: json['success_count'] as int? ?? 0,
|
||||
failureCount: json['failure_count'] as int? ?? 0,
|
||||
routeWeight: (json['route_weight'] as num?)?.toDouble() ?? 1.0,
|
||||
recentSuccess: (json['recent_success'] as num?)?.toDouble(),
|
||||
recentFailure: (json['recent_failure'] as num?)?.toDouble(),
|
||||
statsAt: json['stats_at'] != null
|
||||
? DateTime.tryParse(json['stats_at'] as String)
|
||||
: null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,44 @@ import 'contact.dart';
|
||||
|
||||
const int recentAttemptDiversityWindow = 2;
|
||||
|
||||
/// What the radio can hear right now, so auto routing can prefer routes that
|
||||
/// fit where the user currently is (e.g. home vs. work repeaters).
|
||||
///
|
||||
/// "Not heard" is weak evidence — repeaters advert rarely and the radio only
|
||||
/// reports what it hears — so routes that don't fit are deprioritised, never
|
||||
/// excluded.
|
||||
class RouteContext {
|
||||
/// Whether anything was heard recently. Without that, nothing is known
|
||||
/// about the surroundings and every route is treated alike.
|
||||
final bool hasNeighbourInfo;
|
||||
|
||||
/// Whether the contact itself was heard with no repeater in between.
|
||||
final bool contactHeardDirectly;
|
||||
|
||||
/// Whether the first hop of a route ([pathBytes], [hashWidth] bytes per
|
||||
/// hop) was heard directly recently.
|
||||
final bool Function(List<int> pathBytes, int hashWidth) firstHopHeard;
|
||||
|
||||
/// The path the radio currently holds for the contact, if any.
|
||||
final List<int>? radioPath;
|
||||
|
||||
const RouteContext({
|
||||
required this.hasNeighbourInfo,
|
||||
required this.contactHeardDirectly,
|
||||
required this.firstHopHeard,
|
||||
this.radioPath,
|
||||
});
|
||||
|
||||
static bool _never(List<int> pathBytes, int hashWidth) => false;
|
||||
|
||||
/// Nothing known: every route is treated alike.
|
||||
static const RouteContext unknown = RouteContext(
|
||||
hasNeighbourInfo: false,
|
||||
contactHeardDirectly: false,
|
||||
firstHopHeard: _never,
|
||||
);
|
||||
}
|
||||
|
||||
class PathSelection {
|
||||
final List<int> pathBytes;
|
||||
final int hopCount;
|
||||
@@ -32,11 +70,15 @@ PathSelection resolvePathSelection(
|
||||
);
|
||||
}
|
||||
|
||||
if (forceFlood || contact.pathLength < 0 || selection?.useFlood == true) {
|
||||
if (forceFlood || selection?.useFlood == true) {
|
||||
return const PathSelection(pathBytes: [], hopCount: -1, useFlood: true);
|
||||
}
|
||||
|
||||
if (selection != null && selection.pathBytes.isNotEmpty) {
|
||||
// A route picked from history wins even when the radio holds no path for
|
||||
// the contact: it is proven, and flooding would throw that away. A direct
|
||||
// (zero-hop) selection has no hop bytes but is still a real path.
|
||||
if (selection != null &&
|
||||
(selection.pathBytes.isNotEmpty || selection.hopCount == 0)) {
|
||||
return PathSelection(
|
||||
pathBytes: selection.pathBytes,
|
||||
hopCount: selection.hopCount,
|
||||
@@ -44,6 +86,10 @@ PathSelection resolvePathSelection(
|
||||
);
|
||||
}
|
||||
|
||||
if (contact.pathLength < 0) {
|
||||
return const PathSelection(pathBytes: [], hopCount: -1, useFlood: true);
|
||||
}
|
||||
|
||||
return PathSelection(
|
||||
pathBytes: contact.path,
|
||||
hopCount: contact.pathLength,
|
||||
|
||||
@@ -526,116 +526,6 @@ class AppSettingsScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
title: Text(context.l10n.appSettings_maxRouteWeight),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context.l10n.appSettings_maxRouteWeightSubtitle,
|
||||
),
|
||||
Slider(
|
||||
value: settingsService.settings.maxRouteWeight,
|
||||
min: 1,
|
||||
max: 10,
|
||||
divisions: 9,
|
||||
label: settingsService.settings.maxRouteWeight
|
||||
.round()
|
||||
.toString(),
|
||||
onChanged: (value) =>
|
||||
settingsService.setMaxRouteWeight(value),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
title: Text(
|
||||
context.l10n.appSettings_initialRouteWeight,
|
||||
),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context
|
||||
.l10n
|
||||
.appSettings_initialRouteWeightSubtitle,
|
||||
),
|
||||
Slider(
|
||||
value:
|
||||
settingsService.settings.initialRouteWeight,
|
||||
min: 0.5,
|
||||
max: 5.0,
|
||||
divisions: 9,
|
||||
label: settingsService.settings.initialRouteWeight
|
||||
.toStringAsFixed(1),
|
||||
onChanged: (value) =>
|
||||
settingsService.setInitialRouteWeight(value),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
title: Text(
|
||||
context.l10n.appSettings_routeWeightSuccessIncrement,
|
||||
),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context
|
||||
.l10n
|
||||
.appSettings_routeWeightSuccessIncrementSubtitle,
|
||||
),
|
||||
Slider(
|
||||
value: settingsService
|
||||
.settings
|
||||
.routeWeightSuccessIncrement,
|
||||
min: 0.1,
|
||||
max: 2.0,
|
||||
divisions: 19,
|
||||
label: settingsService
|
||||
.settings
|
||||
.routeWeightSuccessIncrement
|
||||
.toStringAsFixed(1),
|
||||
onChanged: (value) => settingsService
|
||||
.setRouteWeightSuccessIncrement(value),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
title: Text(
|
||||
context.l10n.appSettings_routeWeightFailureDecrement,
|
||||
),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context
|
||||
.l10n
|
||||
.appSettings_routeWeightFailureDecrementSubtitle,
|
||||
),
|
||||
Slider(
|
||||
value: settingsService
|
||||
.settings
|
||||
.routeWeightFailureDecrement,
|
||||
min: 0.1,
|
||||
max: 2.0,
|
||||
divisions: 19,
|
||||
label: settingsService
|
||||
.settings
|
||||
.routeWeightFailureDecrement
|
||||
.toStringAsFixed(1),
|
||||
onChanged: (value) => settingsService
|
||||
.setRouteWeightFailureDecrement(value),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
title: Text(context.l10n.appSettings_maxMessageRetries),
|
||||
|
||||
@@ -14,6 +14,7 @@ import '../connector/meshcore_connector.dart';
|
||||
import '../models/community.dart';
|
||||
import '../storage/community_store.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
import '../helpers/chat_jump.dart';
|
||||
import '../helpers/chat_scroll_controller.dart';
|
||||
import '../connector/meshcore_protocol.dart';
|
||||
import '../helpers/cyr2lat.dart';
|
||||
@@ -137,11 +138,34 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
int _imageStoreVersion = 0;
|
||||
ModalRoute<dynamic>? _route;
|
||||
|
||||
/// The channel chat currently registered as the visible conversation. A
|
||||
/// screen only clears the registration it owns, so one disposed after the
|
||||
/// screen underneath re-registered cannot wipe that out.
|
||||
static _ChannelChatScreenState? _activeOwner;
|
||||
|
||||
void _registerActive() {
|
||||
final connector = _connector;
|
||||
if (connector == null) return;
|
||||
_activeOwner = this;
|
||||
connector.setActiveChannel(widget.channel.index);
|
||||
}
|
||||
|
||||
void _unregisterActive() {
|
||||
if (!identical(_activeOwner, this)) return;
|
||||
_activeOwner = null;
|
||||
_connector?.setActiveChannel(null);
|
||||
}
|
||||
|
||||
/// Filtered messages the user tapped open on this screen. Session-only by
|
||||
/// design: leaving the chat hides them again.
|
||||
final Set<String> _revealedFilteredIds = <String>{};
|
||||
int _revealVersion = 0;
|
||||
|
||||
/// Message ids picked for a bulk action. Non-empty means selection mode:
|
||||
/// taps toggle messages and the app bar shows the bulk actions.
|
||||
final Set<String> _selectedIds = <String>{};
|
||||
bool get _selecting => _selectedIds.isNotEmpty;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -152,7 +176,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
if (!mounted) return;
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final settings = context.read<AppSettingsService>().settings;
|
||||
final idx = widget.channel.index;
|
||||
final unread = widget.initialUnreadCount;
|
||||
final messages = connector.getChannelMessages(widget.channel);
|
||||
_loadCommunities();
|
||||
@@ -163,8 +186,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
setState(() {
|
||||
if (anchor != null) _unreadDividerMessageId = anchor.messageId;
|
||||
});
|
||||
connector.setActiveChannel(idx);
|
||||
_connector = connector;
|
||||
if (_route?.isCurrent ?? true) _registerActive();
|
||||
if (anchor != null && settings.jumpToOldestUnread) {
|
||||
_channelSkipNextBottomSnap = true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
@@ -302,9 +325,19 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
|
||||
/// Reloads communities when a route pushed on top of this one is popped,
|
||||
/// so a community joined or created elsewhere gets its badge and type here.
|
||||
///
|
||||
/// Also keeps the active conversation honest: a page pushed on top (e.g.
|
||||
/// another chat opened from a notification) hides this channel, so its
|
||||
/// messages must count as unread again until it is uncovered.
|
||||
void _onCoveringRouteStatus(AnimationStatus status) {
|
||||
if (status == AnimationStatus.dismissed && mounted) {
|
||||
if (!mounted) return;
|
||||
if (status == AnimationStatus.dismissed) {
|
||||
_registerActive();
|
||||
_loadCommunities();
|
||||
} else {
|
||||
// Not just `forward`: a page pushed without a transition jumps
|
||||
// straight to `completed`.
|
||||
_unregisterActive();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,12 +345,13 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
void dispose() {
|
||||
_route?.secondaryAnimation?.removeStatusListener(_onCoveringRouteStatus);
|
||||
_watchedImageStore?.removeListener(_onImageStoreChanged);
|
||||
_connector?.setActiveChannel(null);
|
||||
_unregisterActive();
|
||||
_scrollController.showJumpToBottom.removeListener(_clearDividerAtBottom);
|
||||
_textFieldFocusNode.removeListener(_onTextFieldFocusChange);
|
||||
_textFieldFocusNode.dispose();
|
||||
_textController.dispose();
|
||||
_searchController.dispose();
|
||||
_highlightTimer?.cancel();
|
||||
_scrollController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -458,9 +492,61 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
query: _searchQuery.trim(),
|
||||
loadEntries: loadEntries,
|
||||
textScale: context.watch<ChatTextScaleService>().scale,
|
||||
onSelect: (entry) => unawaited(_jumpToSearchResult(entry.id)),
|
||||
);
|
||||
}
|
||||
|
||||
/// Message briefly highlighted after jumping to it from search.
|
||||
String? _highlightedMessageId;
|
||||
Timer? _highlightTimer;
|
||||
|
||||
/// Closes search and scrolls the transcript to [messageId], loading older
|
||||
/// pages first when the message is further back than what is loaded.
|
||||
Future<void> _jumpToSearchResult(String messageId) async {
|
||||
FocusScope.of(context).unfocus();
|
||||
_closeSearch();
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
bool loaded() => connector
|
||||
.getChannelMessages(widget.channel)
|
||||
.any((m) => m.messageId == messageId);
|
||||
for (var page = 0; page < 500 && !loaded(); page++) {
|
||||
if (!mounted || _olderHistoryExhausted) break;
|
||||
if (_isLoadingOlder) {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 50));
|
||||
continue;
|
||||
}
|
||||
await _loadOlderMessages();
|
||||
}
|
||||
// Let the transcript (rebuilt after closing search) lay out.
|
||||
await WidgetsBinding.instance.endOfFrame;
|
||||
if (!mounted) return;
|
||||
final layout = _transcriptLayout;
|
||||
final index = layout == null || !loaded()
|
||||
? -1
|
||||
: layout.ids.indexOf(layout.entryIdFor(messageId));
|
||||
final found =
|
||||
index >= 0 &&
|
||||
await scrollListToIndex(
|
||||
controller: _scrollController,
|
||||
targetIndex: index,
|
||||
itemCount: layout!.length,
|
||||
isMounted: () => mounted,
|
||||
);
|
||||
if (!mounted) return;
|
||||
if (!found) {
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(context.l10n.chatSearch_jumpFailed),
|
||||
);
|
||||
return;
|
||||
}
|
||||
_highlightTimer?.cancel();
|
||||
setState(() => _highlightedMessageId = layout.entryIdFor(messageId));
|
||||
_highlightTimer = Timer(const Duration(seconds: 2), () {
|
||||
if (mounted) setState(() => _highlightedMessageId = null);
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<ChatSearchEntry>> _loadSearchEntries() async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final messages = await connector.allChannelMessagesForSearch(
|
||||
@@ -484,9 +570,14 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopScope(
|
||||
canPop: !_searching,
|
||||
canPop: !_searching && !_selecting,
|
||||
onPopInvokedWithResult: (didPop, _) {
|
||||
if (!didPop && _searching) _closeSearch();
|
||||
if (didPop) return;
|
||||
if (_selecting) {
|
||||
_clearSelection();
|
||||
} else if (_searching) {
|
||||
_closeSearch();
|
||||
}
|
||||
},
|
||||
child: _buildScaffold(context),
|
||||
);
|
||||
@@ -494,196 +585,203 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
|
||||
Widget _buildScaffold(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: _searching
|
||||
? IconButton(
|
||||
tooltip: context.l10n.chatSearch_close,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: _closeSearch,
|
||||
)
|
||||
: null,
|
||||
title: _searching
|
||||
? _buildSearchField()
|
||||
: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => openRegionSelectDialog(widget.channel),
|
||||
child: Row(
|
||||
children: [
|
||||
_channelIcon(widget.channel),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
appBar: _selecting
|
||||
? _buildSelectionAppBar(context)
|
||||
: AppBar(
|
||||
leading: _searching
|
||||
? IconButton(
|
||||
tooltip: context.l10n.chatSearch_close,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: _closeSearch,
|
||||
)
|
||||
: null,
|
||||
title: _searching
|
||||
? _buildSearchField()
|
||||
: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => openRegionSelectDialog(widget.channel),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
widget.channel.name.isEmpty
|
||||
? context.l10n.channels_channelIndex(
|
||||
widget.channel.index,
|
||||
)
|
||||
: widget.channel.name,
|
||||
style: const TextStyle(fontSize: 16),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, _) {
|
||||
// Hashtag channels get no type label: the # icon
|
||||
// and name already say it, and the title needs the
|
||||
// room.
|
||||
final privacy = switch (Channel.getChannelType(
|
||||
widget.channel,
|
||||
_communityIndex,
|
||||
)) {
|
||||
ChannelType.public =>
|
||||
context.l10n.channels_public,
|
||||
ChannelType.hashtag => null,
|
||||
ChannelType.private =>
|
||||
context.l10n.channels_private,
|
||||
ChannelType.communityPublic =>
|
||||
context.l10n.community_publicChannel,
|
||||
ChannelType.communityHashtag => null,
|
||||
};
|
||||
final ownRegion = connector.getChannelRegion(
|
||||
widget.channel.index,
|
||||
);
|
||||
final region = connector
|
||||
.getEffectiveChannelRegion(
|
||||
widget.channel.index,
|
||||
);
|
||||
final defaultSuffix = ownRegion.isEmpty
|
||||
? ' ${context.l10n.channels_regionDefaultSuffix}'
|
||||
: '';
|
||||
final radioDefault =
|
||||
connector.defaultFloodScopeName;
|
||||
final regionText = region.isNotEmpty
|
||||
? '${context.l10n.channels_regionSetTo(region)}$defaultSuffix'
|
||||
: radioDefault != null &&
|
||||
connector.channelUsesRadioDefaultScope(
|
||||
_channelIcon(widget.channel),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
widget.channel.name.isEmpty
|
||||
? context.l10n.channels_channelIndex(
|
||||
widget.channel.index,
|
||||
)
|
||||
? '${context.l10n.channels_regionSetTo(radioDefault)} ${context.l10n.channels_regionRadioDefaultSuffix}'
|
||||
: null;
|
||||
final subtitle = [
|
||||
?privacy,
|
||||
?regionText,
|
||||
].join(' • ');
|
||||
if (subtitle.isEmpty) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return Text(
|
||||
subtitle,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
);
|
||||
},
|
||||
: widget.channel.name,
|
||||
style: const TextStyle(fontSize: 16),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, _) {
|
||||
// Hashtag channels get no type label: the # icon
|
||||
// and name already say it, and the title needs the
|
||||
// room.
|
||||
final privacy =
|
||||
switch (Channel.getChannelType(
|
||||
widget.channel,
|
||||
_communityIndex,
|
||||
)) {
|
||||
ChannelType.public =>
|
||||
context.l10n.channels_public,
|
||||
ChannelType.hashtag => null,
|
||||
ChannelType.private =>
|
||||
context.l10n.channels_private,
|
||||
ChannelType.communityPublic =>
|
||||
context
|
||||
.l10n
|
||||
.community_publicChannel,
|
||||
ChannelType.communityHashtag => null,
|
||||
};
|
||||
final ownRegion = connector
|
||||
.getChannelRegion(widget.channel.index);
|
||||
final region = connector
|
||||
.getEffectiveChannelRegion(
|
||||
widget.channel.index,
|
||||
);
|
||||
final defaultSuffix = ownRegion.isEmpty
|
||||
? ' ${context.l10n.channels_regionDefaultSuffix}'
|
||||
: '';
|
||||
final radioDefault =
|
||||
connector.defaultFloodScopeName;
|
||||
final regionText = region.isNotEmpty
|
||||
? '${context.l10n.channels_regionSetTo(region)}$defaultSuffix'
|
||||
: radioDefault != null &&
|
||||
connector
|
||||
.channelUsesRadioDefaultScope(
|
||||
widget.channel.index,
|
||||
)
|
||||
? '${context.l10n.channels_regionSetTo(radioDefault)} ${context.l10n.channels_regionRadioDefaultSuffix}'
|
||||
: null;
|
||||
final subtitle = [
|
||||
?privacy,
|
||||
?regionText,
|
||||
].join(' • ');
|
||||
if (subtitle.isEmpty) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return Text(
|
||||
subtitle,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
bottom: const SyncProgressAppBarBottom(),
|
||||
actions: [
|
||||
Consumer<AppSettingsService>(
|
||||
builder: (context, settings, _) {
|
||||
final muteKey = widget.channel.muteKey;
|
||||
final notificationMode = settings
|
||||
.getChannelNotificationMode(muteKey);
|
||||
return IconButton(
|
||||
tooltip: context.l10n.channels_notificationModeTooltip(
|
||||
channelNotificationModeLabel(context, notificationMode),
|
||||
),
|
||||
icon: Icon(
|
||||
notificationMode == ChannelNotificationMode.muted
|
||||
? Icons.notifications_off
|
||||
: notificationMode ==
|
||||
ChannelNotificationMode.mentionsOnly
|
||||
? Icons.notification_important
|
||||
: Icons.notifications,
|
||||
),
|
||||
onPressed: () =>
|
||||
showChannelNotificationModeSheet(context, muteKey),
|
||||
);
|
||||
},
|
||||
),
|
||||
const RadioStatsIconButton(),
|
||||
if (!_searching)
|
||||
IconButton(
|
||||
tooltip: context.l10n.chatSearch_tooltip,
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: _openSearch,
|
||||
),
|
||||
PopupMenuButton<String>(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
onSelected: (value) {
|
||||
if (value == 'region') {
|
||||
openRegionSelectDialog(widget.channel);
|
||||
} else if (value == 'background') {
|
||||
showChatBackgroundSheet(
|
||||
context,
|
||||
ChatBackgroundService.channelKey(widget.channel),
|
||||
);
|
||||
} else if (value == 'clearChat') {
|
||||
_confirmClearChat();
|
||||
} else if (value == 'messageFilter') {
|
||||
_toggleChannelFiltering();
|
||||
}
|
||||
},
|
||||
// Region lives here (and on a tap of the title) so the channel
|
||||
// name keeps its room in the app bar.
|
||||
itemBuilder: (context) => [
|
||||
if (_messageFilter case final filter?
|
||||
when filter.settings.enabled)
|
||||
CheckedPopupMenuItem(
|
||||
value: 'messageFilter',
|
||||
checked: filter.isChannelFiltered(
|
||||
_messageFilterChannelId,
|
||||
),
|
||||
child: Text(context.l10n.messageFilter_channelToggle),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'region',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.landscape, size: 20),
|
||||
const SizedBox(width: 12),
|
||||
Text(context.l10n.channels_regionSelect_Title),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'background',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.wallpaper, size: 20),
|
||||
const SizedBox(width: 12),
|
||||
Text(context.l10n.chatBackground_title),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'clearChat',
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.delete,
|
||||
size: 20,
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
context.l10n.contact_clearChat,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
bottom: const SyncProgressAppBarBottom(),
|
||||
actions: [
|
||||
Consumer<AppSettingsService>(
|
||||
builder: (context, settings, _) {
|
||||
final muteKey = widget.channel.muteKey;
|
||||
final notificationMode = settings.getChannelNotificationMode(
|
||||
muteKey,
|
||||
);
|
||||
return IconButton(
|
||||
tooltip: context.l10n.channels_notificationModeTooltip(
|
||||
channelNotificationModeLabel(context, notificationMode),
|
||||
),
|
||||
icon: Icon(
|
||||
notificationMode == ChannelNotificationMode.muted
|
||||
? Icons.notifications_off
|
||||
: notificationMode == ChannelNotificationMode.mentionsOnly
|
||||
? Icons.notification_important
|
||||
: Icons.notifications,
|
||||
),
|
||||
onPressed: () =>
|
||||
showChannelNotificationModeSheet(context, muteKey),
|
||||
);
|
||||
},
|
||||
),
|
||||
const RadioStatsIconButton(),
|
||||
if (!_searching)
|
||||
IconButton(
|
||||
tooltip: context.l10n.chatSearch_tooltip,
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: _openSearch,
|
||||
],
|
||||
),
|
||||
PopupMenuButton<String>(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
onSelected: (value) {
|
||||
if (value == 'region') {
|
||||
openRegionSelectDialog(widget.channel);
|
||||
} else if (value == 'background') {
|
||||
showChatBackgroundSheet(
|
||||
context,
|
||||
ChatBackgroundService.channelKey(widget.channel),
|
||||
);
|
||||
} else if (value == 'clearChat') {
|
||||
_confirmClearChat();
|
||||
} else if (value == 'messageFilter') {
|
||||
_toggleChannelFiltering();
|
||||
}
|
||||
},
|
||||
// Region lives here (and on a tap of the title) so the channel
|
||||
// name keeps its room in the app bar.
|
||||
itemBuilder: (context) => [
|
||||
if (_messageFilter case final filter?
|
||||
when filter.settings.enabled)
|
||||
CheckedPopupMenuItem(
|
||||
value: 'messageFilter',
|
||||
checked: filter.isChannelFiltered(_messageFilterChannelId),
|
||||
child: Text(context.l10n.messageFilter_channelToggle),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'region',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.landscape, size: 20),
|
||||
const SizedBox(width: 12),
|
||||
Text(context.l10n.channels_regionSelect_Title),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'background',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.wallpaper, size: 20),
|
||||
const SizedBox(width: 12),
|
||||
Text(context.l10n.chatBackground_title),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'clearChat',
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.delete,
|
||||
size: 20,
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
context.l10n.contact_clearChat,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
body: _showSearchResults
|
||||
? _buildSearchResults(_loadSearchEntries)
|
||||
: SafeArea(
|
||||
@@ -820,7 +918,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
>((service) => service.scale);
|
||||
final message = row.message;
|
||||
final ghost = row.ghost;
|
||||
final Widget bubble;
|
||||
Widget bubble;
|
||||
if (ghost != null) {
|
||||
bubble = _buildFilteredGhost(
|
||||
ghost,
|
||||
@@ -852,6 +950,24 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
.receivedAt,
|
||||
row.receivedAt,
|
||||
);
|
||||
if (row.id == _highlightedMessageId) {
|
||||
bubble = AnimatedContainer(
|
||||
duration: const Duration(
|
||||
milliseconds: 300,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary
|
||||
.withValues(alpha: 0.18),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
MeshRadii.md,
|
||||
),
|
||||
),
|
||||
child: bubble,
|
||||
);
|
||||
}
|
||||
if (isUnreadAnchor || startsDay) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -1001,7 +1117,9 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
],
|
||||
Flexible(
|
||||
child: GestureDetector(
|
||||
onLongPress: () => _showMessageActions(message),
|
||||
onLongPress: () => _selecting
|
||||
? _toggleSelected(message)
|
||||
: _showMessageActions(message),
|
||||
onSecondaryTapUp: PlatformInfo.isDesktop
|
||||
? (_) => _showMessageActions(message)
|
||||
: null,
|
||||
@@ -1311,6 +1429,9 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
),
|
||||
);
|
||||
|
||||
if (_selecting) {
|
||||
return _buildSelectableRow(message, messageBody);
|
||||
}
|
||||
if (!isOutgoing && !PlatformInfo.isDesktop) {
|
||||
return _SwipeReplyBubble(
|
||||
maxSwipeOffset: maxSwipeOffset,
|
||||
@@ -2739,6 +2860,14 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
_setReplyingTo(message);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.checklist),
|
||||
title: Text(context.l10n.chat_selectMessages),
|
||||
onTap: () {
|
||||
Navigator.pop(sheetContext);
|
||||
_toggleSelected(message);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.route),
|
||||
title: Text(context.l10n.chat_path),
|
||||
@@ -2867,6 +2996,212 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
// ---- bulk selection -------------------------------------------------------
|
||||
|
||||
void _toggleSelected(ChannelMessage message) {
|
||||
HapticFeedback.selectionClick();
|
||||
setState(() {
|
||||
if (!_selectedIds.remove(message.messageId)) {
|
||||
_selectedIds.add(message.messageId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void _clearSelection() => setState(_selectedIds.clear);
|
||||
|
||||
/// Selected messages still in the transcript, oldest first.
|
||||
List<ChannelMessage> _selectedMessages() {
|
||||
final messages = context.read<MeshCoreConnector>().getChannelMessages(
|
||||
widget.channel,
|
||||
);
|
||||
return [
|
||||
for (final m in messages)
|
||||
if (_selectedIds.contains(m.messageId)) m,
|
||||
];
|
||||
}
|
||||
|
||||
/// Messages the user can currently see (filtered ones only once revealed).
|
||||
List<ChannelMessage> _visibleMessages() {
|
||||
final messages = context.read<MeshCoreConnector>().getChannelMessages(
|
||||
widget.channel,
|
||||
);
|
||||
final filterActive = _transcriptLayout?.filterActive ?? true;
|
||||
return [
|
||||
for (final m in messages)
|
||||
if (!(filterActive &&
|
||||
m.isFiltered &&
|
||||
!_revealedFilteredIds.contains(m.messageId)))
|
||||
m,
|
||||
];
|
||||
}
|
||||
|
||||
bool _canMarkSpam(ChannelMessage m) =>
|
||||
!m.isOutgoing &&
|
||||
!m.isFiltered &&
|
||||
!MessageFilterText.isStructuredPayload(m.text);
|
||||
|
||||
Widget _buildSelectableRow(ChannelMessage message, Widget messageBody) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final selected = _selectedIds.contains(message.messageId);
|
||||
return Semantics(
|
||||
selected: selected,
|
||||
button: true,
|
||||
child: Material(
|
||||
color: selected
|
||||
? scheme.primary.withValues(alpha: 0.16)
|
||||
: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => _toggleSelected(message),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 3, horizontal: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
selected ? Icons.check_circle : Icons.radio_button_unchecked,
|
||||
size: 28,
|
||||
color: selected ? scheme.primary : scheme.onSurfaceVariant,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
// Links, reply previews and reactions inside the bubble must
|
||||
// not react while picking messages.
|
||||
Expanded(child: AbsorbPointer(child: messageBody)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
PreferredSizeWidget _buildSelectionAppBar(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final selected = _selectedMessages();
|
||||
final filter = _messageFilter;
|
||||
final filterCoversChannel =
|
||||
filter != null && filter.isChannelFiltered(_messageFilterChannelId);
|
||||
final spamCandidates = filterCoversChannel
|
||||
? selected.where(_canMarkSpam).toList()
|
||||
: const <ChannelMessage>[];
|
||||
final notSpamCandidates = filterCoversChannel
|
||||
? selected.where((m) => m.isFiltered).toList()
|
||||
: const <ChannelMessage>[];
|
||||
return AppBar(
|
||||
leading: IconButton(
|
||||
tooltip: l10n.chat_clearSelection,
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: _clearSelection,
|
||||
),
|
||||
title: Text(l10n.chat_selectedCount(selected.length)),
|
||||
actions: [
|
||||
if (spamCandidates.isNotEmpty)
|
||||
IconButton(
|
||||
tooltip: l10n.messageFilter_markSpam,
|
||||
icon: const Icon(Icons.visibility_off_outlined),
|
||||
onPressed: () => _bulkMarkSpam(spamCandidates),
|
||||
),
|
||||
if (notSpamCandidates.isNotEmpty)
|
||||
IconButton(
|
||||
tooltip: l10n.messageFilter_notSpam,
|
||||
icon: const Icon(Icons.visibility_outlined),
|
||||
onPressed: () => _bulkMarkNotSpam(notSpamCandidates),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: l10n.common_delete,
|
||||
icon: const Icon(Icons.delete_outline),
|
||||
onPressed: selected.isEmpty ? null : () => _bulkDelete(selected),
|
||||
),
|
||||
PopupMenuButton<String>(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
onSelected: (value) {
|
||||
switch (value) {
|
||||
case 'select_all':
|
||||
setState(() {
|
||||
_selectedIds.addAll(
|
||||
_visibleMessages().map((m) => m.messageId),
|
||||
);
|
||||
});
|
||||
case 'copy':
|
||||
_bulkCopy(selected);
|
||||
}
|
||||
},
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'select_all',
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.select_all),
|
||||
title: Text(l10n.chat_selectAll),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'copy',
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.copy),
|
||||
title: Text(l10n.common_copy),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _bulkMarkSpam(List<ChannelMessage> messages) async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final text = context.l10n.messageFilter_markedSpamCount(messages.length);
|
||||
setState(() {
|
||||
_selectedIds.clear();
|
||||
_revealedFilteredIds.removeAll(messages.map((m) => m.messageId));
|
||||
_revealVersion++;
|
||||
});
|
||||
await connector.markChannelMessagesSpam([
|
||||
for (final m in messages) (widget.channel, m),
|
||||
]);
|
||||
if (!mounted) return;
|
||||
showDismissibleSnackBar(context, content: Text(text));
|
||||
}
|
||||
|
||||
Future<void> _bulkMarkNotSpam(List<ChannelMessage> messages) async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final text = context.l10n.messageFilter_markedNotSpamCount(messages.length);
|
||||
setState(() {
|
||||
_selectedIds.clear();
|
||||
_revealedFilteredIds.removeAll(messages.map((m) => m.messageId));
|
||||
_revealVersion++;
|
||||
});
|
||||
await connector.markChannelMessagesNotSpam([
|
||||
for (final m in messages) (widget.channel, m),
|
||||
]);
|
||||
if (!mounted) return;
|
||||
showDismissibleSnackBar(context, content: Text(text));
|
||||
}
|
||||
|
||||
Future<void> _bulkDelete(List<ChannelMessage> messages) async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final confirmed = await confirmBulkDelete(context, messages.length);
|
||||
if (!confirmed || !mounted) return;
|
||||
setState(_selectedIds.clear);
|
||||
final removed = await connector.deleteChannelMessages(messages);
|
||||
if (!mounted || removed == 0) return;
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(context.l10n.chat_messagesDeleted(removed)),
|
||||
);
|
||||
}
|
||||
|
||||
void _bulkCopy(List<ChannelMessage> messages) {
|
||||
final text = messages
|
||||
.map(
|
||||
(m) => m.senderName.isEmpty || m.isOutgoing
|
||||
? m.text
|
||||
: '${m.senderName}: ${m.text}',
|
||||
)
|
||||
.join('\n');
|
||||
setState(_selectedIds.clear);
|
||||
copyChatMessageText(context, text);
|
||||
}
|
||||
|
||||
// ---- message filter -------------------------------------------------------
|
||||
|
||||
/// The message filter, or null when it is not registered (screen tests).
|
||||
@@ -3331,15 +3666,28 @@ class _SwipeReplyBubbleState extends State<_SwipeReplyBubble> {
|
||||
}
|
||||
|
||||
final rawDx = event.position.dx - _swipeStartPosition!.dx;
|
||||
final dy = (event.position.dy - _swipeStartPosition!.dy).abs();
|
||||
// In LTR swipe left (rawDx < 0) triggers reply; in RTL swipe right (rawDx > 0).
|
||||
final signedDx = _isRtl ? rawDx : -rawDx;
|
||||
|
||||
const axisLockThreshold = 12.0;
|
||||
if (!_swipeLockedToHorizontal) {
|
||||
if (signedDx < axisLockThreshold) {
|
||||
// A gesture that moves vertically first is a scroll: give it up for
|
||||
// the rest of this pointer so a diagonal thumb drift while scrolling
|
||||
// cannot trigger a reply.
|
||||
if (dy >= axisLockThreshold && dy >= signedDx.abs()) {
|
||||
_resetSwipe();
|
||||
return;
|
||||
}
|
||||
// Lock only for a clearly horizontal drag.
|
||||
if (signedDx < axisLockThreshold || signedDx < dy * 2) {
|
||||
return;
|
||||
}
|
||||
_swipeLockedToHorizontal = true;
|
||||
} else if (dy > math.max(48.0, signedDx)) {
|
||||
// The finger wandered off vertically (list scrolled under it).
|
||||
_resetSwipe();
|
||||
return;
|
||||
}
|
||||
|
||||
_handleSwipeUpdate(event.position);
|
||||
|
||||
@@ -553,6 +553,7 @@ class _ChannelMessagePathMapScreenState
|
||||
PathViewMode _viewMode = PathViewMode.single;
|
||||
final Set<String> _hiddenPathIds = {};
|
||||
bool _panelCollapsed = false;
|
||||
bool _panelExpanded = false;
|
||||
bool _animationEnabled = true;
|
||||
bool _followPacket = false;
|
||||
|
||||
@@ -1380,8 +1381,13 @@ class _ChannelMessagePathMapScreenState
|
||||
combined: combined,
|
||||
showInferredLegend: false,
|
||||
collapsed: _panelCollapsed,
|
||||
onToggleCollapsed: () =>
|
||||
setState(() => _panelCollapsed = !_panelCollapsed),
|
||||
onToggleCollapsed: () => setState(() {
|
||||
_panelCollapsed = !_panelCollapsed;
|
||||
// Reopening a collapsed panel returns to the normal height.
|
||||
if (_panelCollapsed) _panelExpanded = false;
|
||||
}),
|
||||
expanded: _panelExpanded,
|
||||
onToggleExpanded: () => setState(() => _panelExpanded = !_panelExpanded),
|
||||
playback: _playback,
|
||||
selected: selectedDisplay,
|
||||
animationEnabled: _animationEnabled,
|
||||
|
||||
+119
-20
@@ -12,6 +12,7 @@ import '../utils/platform_info.dart';
|
||||
|
||||
import '../connector/meshcore_connector.dart';
|
||||
import '../connector/meshcore_protocol.dart';
|
||||
import '../helpers/chat_jump.dart';
|
||||
import '../helpers/cyr2lat.dart';
|
||||
import '../helpers/message_url_image_helper.dart';
|
||||
import '../helpers/path_helper.dart';
|
||||
@@ -96,16 +97,53 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
String? _unreadDividerMessageId;
|
||||
final ChatSendGuard _sendGuard = ChatSendGuard();
|
||||
|
||||
/// Contact keys of the chat screens currently on the navigation stack, in
|
||||
/// push order. A room chat can push a nested ChatScreen for one of its
|
||||
/// posters; when that one is popped, the room underneath must become the
|
||||
/// active conversation again rather than none at all.
|
||||
static final List<String> _activeContactStack = [];
|
||||
/// The chat currently registered as the visible conversation. Screens
|
||||
/// register while their route is uncovered and unregister when a page is
|
||||
/// pushed over them (a nested room poster chat, a chat opened from a
|
||||
/// notification, …), re-registering when it is popped. Only the owner
|
||||
/// clears the registration, so a screen disposed after the one underneath
|
||||
/// re-registered cannot wipe it out.
|
||||
static _ChatScreenState? _activeOwner;
|
||||
ModalRoute<dynamic>? _route;
|
||||
|
||||
void _registerActive() {
|
||||
final connector = _connector;
|
||||
if (connector == null) return;
|
||||
_activeOwner = this;
|
||||
connector.setActiveContact(widget.contact.publicKeyHex);
|
||||
}
|
||||
|
||||
void _unregisterActive() {
|
||||
if (!identical(_activeOwner, this)) return;
|
||||
_activeOwner = null;
|
||||
_connector?.setActiveContact(null);
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
final route = ModalRoute.of(context);
|
||||
if (!identical(route, _route)) {
|
||||
_route?.secondaryAnimation?.removeStatusListener(_onCoveringRouteStatus);
|
||||
_route = route;
|
||||
route?.secondaryAnimation?.addStatusListener(_onCoveringRouteStatus);
|
||||
}
|
||||
}
|
||||
|
||||
void _onCoveringRouteStatus(AnimationStatus status) {
|
||||
if (!mounted) return;
|
||||
if (status == AnimationStatus.dismissed) {
|
||||
_registerActive();
|
||||
} else {
|
||||
// Not just `forward`: a page pushed without a transition jumps
|
||||
// straight to `completed`.
|
||||
_unregisterActive();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_activeContactStack.add(widget.contact.publicKeyHex);
|
||||
_textFieldFocusNode.addListener(_onTextFieldFocusChange);
|
||||
_scrollController.onScrollNearTop = _loadOlderMessages;
|
||||
_scrollController.showJumpToBottom.addListener(_clearDividerAtBottom);
|
||||
@@ -113,7 +151,6 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
if (!mounted) return;
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final settings = context.read<AppSettingsService>().settings;
|
||||
final keyHex = widget.contact.publicKeyHex;
|
||||
final unread = widget.initialUnreadCount;
|
||||
final messages = connector.getMessages(widget.contact);
|
||||
Message? anchor;
|
||||
@@ -126,8 +163,8 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
_pendingUnreadScrollTarget = anchor;
|
||||
}
|
||||
});
|
||||
connector.setActiveContact(keyHex);
|
||||
_connector = connector;
|
||||
if (_route?.isCurrent ?? true) _registerActive();
|
||||
if (anchor != null && settings.jumpToOldestUnread) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!mounted) return;
|
||||
@@ -194,21 +231,14 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
final index = _activeContactStack.lastIndexOf(widget.contact.publicKeyHex);
|
||||
final wasTop = index == _activeContactStack.length - 1;
|
||||
if (index >= 0) _activeContactStack.removeAt(index);
|
||||
if (wasTop) {
|
||||
// Restore whichever chat is now on top (e.g. the room this nested chat
|
||||
// was opened from), or clear when this was the only one.
|
||||
_connector?.setActiveContact(
|
||||
_activeContactStack.isEmpty ? null : _activeContactStack.last,
|
||||
);
|
||||
}
|
||||
_route?.secondaryAnimation?.removeStatusListener(_onCoveringRouteStatus);
|
||||
_unregisterActive();
|
||||
_scrollController.showJumpToBottom.removeListener(_clearDividerAtBottom);
|
||||
_textFieldFocusNode.removeListener(_onTextFieldFocusChange);
|
||||
_textFieldFocusNode.dispose();
|
||||
_textController.dispose();
|
||||
_searchController.dispose();
|
||||
_highlightTimer?.cancel();
|
||||
_scrollController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -255,9 +285,65 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
query: _searchQuery.trim(),
|
||||
loadEntries: loadEntries,
|
||||
textScale: context.watch<ChatTextScaleService>().scale,
|
||||
onSelect: (entry) => unawaited(_jumpToSearchResult(entry.id)),
|
||||
);
|
||||
}
|
||||
|
||||
/// Message briefly highlighted after jumping to it from search.
|
||||
String? _highlightedMessageId;
|
||||
Timer? _highlightTimer;
|
||||
|
||||
/// Closes search and scrolls the conversation to [messageId], loading
|
||||
/// older pages first when the message is further back than what is loaded.
|
||||
Future<void> _jumpToSearchResult(String messageId) async {
|
||||
FocusScope.of(context).unfocus();
|
||||
_closeSearch();
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final keyHex = widget.contact.publicKeyHex;
|
||||
int indexOf() => connector
|
||||
.getMessages(widget.contact)
|
||||
.indexWhere((m) => m.messageId == messageId);
|
||||
for (var page = 0; page < 500 && indexOf() < 0; page++) {
|
||||
if (!mounted) return;
|
||||
if (_isLoadingOlder) {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 50));
|
||||
continue;
|
||||
}
|
||||
setState(() => _isLoadingOlder = true);
|
||||
final older = await connector.loadOlderMessages(keyHex);
|
||||
if (!mounted) return;
|
||||
setState(() => _isLoadingOlder = false);
|
||||
if (older.isEmpty) break;
|
||||
}
|
||||
// Let the list (rebuilt after closing search) lay out.
|
||||
await WidgetsBinding.instance.endOfFrame;
|
||||
if (!mounted) return;
|
||||
final messages = connector.getMessages(widget.contact);
|
||||
final index = indexOf();
|
||||
// The list is reversed: newest message is row 0.
|
||||
final found =
|
||||
index >= 0 &&
|
||||
await scrollListToIndex(
|
||||
controller: _scrollController,
|
||||
targetIndex: messages.length - 1 - index,
|
||||
itemCount: messages.length,
|
||||
isMounted: () => mounted,
|
||||
);
|
||||
if (!mounted) return;
|
||||
if (!found) {
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(context.l10n.chatSearch_jumpFailed),
|
||||
);
|
||||
return;
|
||||
}
|
||||
_highlightTimer?.cancel();
|
||||
setState(() => _highlightedMessageId = messageId);
|
||||
_highlightTimer = Timer(const Duration(seconds: 2), () {
|
||||
if (mounted) setState(() => _highlightedMessageId = null);
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<ChatSearchEntry>> _loadSearchEntries() async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final contact = _resolveContact(connector);
|
||||
@@ -621,6 +707,19 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
reversedMessages[messageIndex + 1].receivedAt,
|
||||
message.receivedAt,
|
||||
);
|
||||
final highlighted = message.messageId == _highlightedMessageId;
|
||||
final shown = highlighted
|
||||
? AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.primary.withValues(alpha: 0.18),
|
||||
borderRadius: BorderRadius.circular(MeshRadii.md),
|
||||
),
|
||||
child: bubble,
|
||||
)
|
||||
: bubble;
|
||||
final child = isUnreadAnchor || startsDay
|
||||
? Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -628,10 +727,10 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
if (startsDay)
|
||||
ChatDaySeparator(day: message.receivedAt),
|
||||
if (isUnreadAnchor) const UnreadDivider(),
|
||||
bubble,
|
||||
shown,
|
||||
],
|
||||
)
|
||||
: bubble;
|
||||
: shown;
|
||||
if (identical(message, _pendingUnreadScrollTarget)) {
|
||||
return KeyedSubtree(key: _unreadScrollKey, child: child);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import '../widgets/repeater_login_dialog.dart';
|
||||
import '../widgets/room_login_dialog.dart';
|
||||
import '../widgets/sync_progress_overlay.dart';
|
||||
import '../widgets/unread_badge.dart';
|
||||
import '../helpers/contact_share_message.dart';
|
||||
import '../helpers/snack_bar_builder.dart';
|
||||
import 'channels_screen.dart';
|
||||
import 'chat_screen.dart';
|
||||
@@ -356,6 +357,12 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
return;
|
||||
}
|
||||
final text = clipboardData.text!.trim();
|
||||
// A contact shared in chat (`<PUBKEY:TYPE:NAME>`) copied from the bubble.
|
||||
final share = findContactShare(text);
|
||||
if (share != null && !text.startsWith('meshcore://')) {
|
||||
await _importContactShare(connector, share);
|
||||
return;
|
||||
}
|
||||
if (!text.startsWith('meshcore://')) {
|
||||
if (mounted) {
|
||||
showDismissibleSnackBar(
|
||||
@@ -393,6 +400,32 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _importContactShare(
|
||||
MeshCoreConnector connector,
|
||||
ContactShare share,
|
||||
) async {
|
||||
if (!mounted) return;
|
||||
final l10n = context.l10n;
|
||||
if (share.publicKeyHex == connector.selfPublicKeyHex) {
|
||||
showDismissibleSnackBar(context, content: Text(l10n.contactShare_isYou));
|
||||
return;
|
||||
}
|
||||
var ok = true;
|
||||
try {
|
||||
await connector.addContactFromCard(share.toScannedContact());
|
||||
} catch (e) {
|
||||
appLogger.warn('Contact share import failed: $e', tag: 'ContactsScreen');
|
||||
ok = false;
|
||||
}
|
||||
if (!mounted) return;
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(
|
||||
ok ? l10n.contacts_contactImported : l10n.contacts_contactImportFailed,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final connector = context.watch<MeshCoreConnector>();
|
||||
|
||||
@@ -9,6 +9,7 @@ import '../models/channel_message.dart';
|
||||
import '../models/message_filter.dart';
|
||||
import '../widgets/filtered_message_ghost.dart';
|
||||
import '../widgets/adaptive_app_bar_title.dart';
|
||||
import '../widgets/chat_send_pipeline.dart';
|
||||
import '../widgets/empty_state.dart';
|
||||
import '../widgets/mesh_ui.dart';
|
||||
|
||||
@@ -33,6 +34,63 @@ String filteredMessageRowId(Channel channel, ChannelMessage message) =>
|
||||
class _FilteredMessagesScreenState extends State<FilteredMessagesScreen> {
|
||||
final Set<String> _revealed = <String>{};
|
||||
|
||||
/// Bulk selection: when on, taps toggle rows and the app bar holds the
|
||||
/// bulk actions.
|
||||
bool _selectMode = false;
|
||||
final Set<String> _selected = <String>{};
|
||||
|
||||
void _toggleSelected(String rowId) {
|
||||
setState(() {
|
||||
_selectMode = true;
|
||||
if (!_selected.remove(rowId)) _selected.add(rowId);
|
||||
});
|
||||
}
|
||||
|
||||
void _exitSelectMode() => setState(() {
|
||||
_selectMode = false;
|
||||
_selected.clear();
|
||||
});
|
||||
|
||||
List<(Channel, ChannelMessage)> _selectedEntries(
|
||||
List<(Channel, ChannelMessage)> entries,
|
||||
) => [
|
||||
for (final e in entries)
|
||||
if (_selected.contains(_rowId(e.$1, e.$2))) e,
|
||||
];
|
||||
|
||||
Future<void> _bulkNotSpam(List<(Channel, ChannelMessage)> items) async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final text = context.l10n.messageFilter_markedNotSpamCount(items.length);
|
||||
setState(() {
|
||||
for (final (channel, message) in items) {
|
||||
_revealed.remove(_rowId(channel, message));
|
||||
}
|
||||
_selectMode = false;
|
||||
_selected.clear();
|
||||
});
|
||||
await connector.markChannelMessagesNotSpam(items);
|
||||
if (!mounted) return;
|
||||
showDismissibleSnackBar(context, content: Text(text));
|
||||
}
|
||||
|
||||
Future<void> _bulkDelete(List<(Channel, ChannelMessage)> items) async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final confirmed = await confirmBulkDelete(context, items.length);
|
||||
if (!confirmed || !mounted) return;
|
||||
setState(() {
|
||||
_selectMode = false;
|
||||
_selected.clear();
|
||||
});
|
||||
final removed = await connector.deleteChannelMessages(
|
||||
items.map((e) => e.$2),
|
||||
);
|
||||
if (!mounted || removed == 0) return;
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(context.l10n.chat_messagesDeleted(removed)),
|
||||
);
|
||||
}
|
||||
|
||||
static String _rowId(Channel channel, ChannelMessage message) =>
|
||||
filteredMessageRowId(channel, message);
|
||||
|
||||
@@ -60,35 +118,86 @@ class _FilteredMessagesScreenState extends State<FilteredMessagesScreen> {
|
||||
final l10n = context.l10n;
|
||||
final connector = context.watch<MeshCoreConnector>();
|
||||
final entries = connector.recentFilteredChannelMessages();
|
||||
final selectedEntries = _selectedEntries(entries);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: AdaptiveAppBarTitle(l10n.messageFilter_displayTitle),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: entries.isEmpty
|
||||
? EmptyState(
|
||||
icon: Icons.filter_alt_outlined,
|
||||
title: l10n.messageFilter_filteredMessagesEmpty,
|
||||
return PopScope(
|
||||
canPop: !_selectMode,
|
||||
onPopInvokedWithResult: (didPop, _) {
|
||||
if (!didPop && _selectMode) _exitSelectMode();
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: _selectMode
|
||||
? AppBar(
|
||||
leading: IconButton(
|
||||
tooltip: l10n.chat_clearSelection,
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: _exitSelectMode,
|
||||
),
|
||||
title: Text(l10n.chat_selectedCount(selectedEntries.length)),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: l10n.chat_selectAll,
|
||||
icon: const Icon(Icons.select_all),
|
||||
onPressed: () => setState(() {
|
||||
_selected.addAll(entries.map((e) => _rowId(e.$1, e.$2)));
|
||||
}),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: l10n.messageFilter_notSpam,
|
||||
icon: const Icon(Icons.check_circle_outline),
|
||||
onPressed: selectedEntries.isEmpty
|
||||
? null
|
||||
: () => _bulkNotSpam(selectedEntries),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: l10n.common_delete,
|
||||
icon: const Icon(Icons.delete_outline),
|
||||
onPressed: selectedEntries.isEmpty
|
||||
? null
|
||||
: () => _bulkDelete(selectedEntries),
|
||||
),
|
||||
],
|
||||
)
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 24),
|
||||
itemCount: entries.length,
|
||||
itemBuilder: (context, index) {
|
||||
final (channel, message) = entries[index];
|
||||
final id = _rowId(channel, message);
|
||||
return _FilteredMessageCard(
|
||||
key: ValueKey('filtered_$id'),
|
||||
channel: channel,
|
||||
message: message,
|
||||
revealed: _revealed.contains(id),
|
||||
onToggle: () => _toggle(id),
|
||||
onNotSpam: () => _markNotSpam(channel, message),
|
||||
);
|
||||
},
|
||||
: AppBar(
|
||||
title: AdaptiveAppBarTitle(l10n.messageFilter_displayTitle),
|
||||
centerTitle: true,
|
||||
actions: [
|
||||
if (entries.isNotEmpty)
|
||||
IconButton(
|
||||
tooltip: l10n.chat_selectMessages,
|
||||
icon: const Icon(Icons.checklist),
|
||||
onPressed: () => setState(() => _selectMode = true),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: entries.isEmpty
|
||||
? EmptyState(
|
||||
icon: Icons.filter_alt_outlined,
|
||||
title: l10n.messageFilter_filteredMessagesEmpty,
|
||||
)
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 24),
|
||||
itemCount: entries.length,
|
||||
itemBuilder: (context, index) {
|
||||
final (channel, message) = entries[index];
|
||||
final id = _rowId(channel, message);
|
||||
return _FilteredMessageCard(
|
||||
key: ValueKey('filtered_$id'),
|
||||
channel: channel,
|
||||
message: message,
|
||||
revealed: _revealed.contains(id),
|
||||
selectMode: _selectMode,
|
||||
selected: _selected.contains(id),
|
||||
onToggle: () =>
|
||||
_selectMode ? _toggleSelected(id) : _toggle(id),
|
||||
onLongPress: () => _toggleSelected(id),
|
||||
onNotSpam: () => _markNotSpam(channel, message),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -98,7 +207,10 @@ class _FilteredMessageCard extends StatelessWidget {
|
||||
final Channel channel;
|
||||
final ChannelMessage message;
|
||||
final bool revealed;
|
||||
final bool selectMode;
|
||||
final bool selected;
|
||||
final VoidCallback onToggle;
|
||||
final VoidCallback onLongPress;
|
||||
final VoidCallback onNotSpam;
|
||||
|
||||
const _FilteredMessageCard({
|
||||
@@ -106,7 +218,10 @@ class _FilteredMessageCard extends StatelessWidget {
|
||||
required this.channel,
|
||||
required this.message,
|
||||
required this.revealed,
|
||||
required this.selectMode,
|
||||
required this.selected,
|
||||
required this.onToggle,
|
||||
required this.onLongPress,
|
||||
required this.onNotSpam,
|
||||
});
|
||||
|
||||
@@ -131,9 +246,11 @@ class _FilteredMessageCard extends StatelessWidget {
|
||||
color: scheme.onSurfaceVariant,
|
||||
);
|
||||
|
||||
return MeshCard(
|
||||
final card = MeshCard(
|
||||
onTap: onToggle,
|
||||
padding: const EdgeInsets.fromLTRB(16, 12, 8, 4),
|
||||
onLongPress: onLongPress,
|
||||
color: selected ? scheme.primary.withValues(alpha: 0.16) : null,
|
||||
padding: EdgeInsets.fromLTRB(16, 12, 8, selectMode ? 12 : 4),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -208,15 +325,33 @@ class _FilteredMessageCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerEnd,
|
||||
child: TextButton.icon(
|
||||
style: TextButton.styleFrom(minimumSize: const Size(0, 48)),
|
||||
onPressed: onNotSpam,
|
||||
icon: const Icon(Icons.check_circle_outline, size: 22),
|
||||
label: Text(l10n.messageFilter_notSpam),
|
||||
if (!selectMode)
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerEnd,
|
||||
child: TextButton.icon(
|
||||
style: TextButton.styleFrom(minimumSize: const Size(0, 48)),
|
||||
onPressed: onNotSpam,
|
||||
icon: const Icon(Icons.check_circle_outline, size: 22),
|
||||
label: Text(l10n.messageFilter_notSpam),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
if (!selectMode) return card;
|
||||
return Semantics(
|
||||
selected: selected,
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 12),
|
||||
child: Icon(
|
||||
selected ? Icons.check_circle : Icons.radio_button_unchecked,
|
||||
size: 28,
|
||||
color: selected ? scheme.primary : scheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
Expanded(child: card),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -139,6 +139,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
String _selectedPathId = 'primary';
|
||||
final Set<String> _hiddenPathIds = {};
|
||||
bool _panelCollapsed = false;
|
||||
bool _panelExpanded = false;
|
||||
bool _animationEnabled = true;
|
||||
bool _followPacket = false;
|
||||
|
||||
@@ -1655,8 +1656,13 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
combined: combined,
|
||||
showInferredLegend: true,
|
||||
collapsed: _panelCollapsed,
|
||||
onToggleCollapsed: () =>
|
||||
setState(() => _panelCollapsed = !_panelCollapsed),
|
||||
onToggleCollapsed: () => setState(() {
|
||||
_panelCollapsed = !_panelCollapsed;
|
||||
// Reopening a collapsed panel returns to the normal height.
|
||||
if (_panelCollapsed) _panelExpanded = false;
|
||||
}),
|
||||
expanded: _panelExpanded,
|
||||
onToggleExpanded: () => setState(() => _panelExpanded = !_panelExpanded),
|
||||
playback: _playback,
|
||||
selected: selected,
|
||||
animationEnabled: _animationEnabled,
|
||||
|
||||
@@ -33,6 +33,11 @@ class BackgroundService {
|
||||
eventAction: ForegroundTaskEventAction.repeat(5000),
|
||||
autoRunOnBoot: false,
|
||||
allowWifiLock: false,
|
||||
// The radio link lives in the app process; once the user swipes the
|
||||
// app away it is gone, so a lingering "connected" notification (or
|
||||
// an automatic restart) would only be misleading.
|
||||
allowAutoRestart: false,
|
||||
stopWithTask: true,
|
||||
),
|
||||
);
|
||||
_initialized = true;
|
||||
@@ -49,6 +54,9 @@ class BackgroundService {
|
||||
await FlutterForegroundTask.startService(
|
||||
notificationTitle: l10n.background_serviceTitle,
|
||||
notificationText: l10n.background_serviceText,
|
||||
notificationIcon: const NotificationIcon(
|
||||
metaDataName: 'org.meshcore.open.NOTIFICATION_ICON',
|
||||
),
|
||||
callback: startCallback,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -281,12 +281,28 @@ class MessageFilterService extends ChangeNotifier {
|
||||
}
|
||||
|
||||
/// User tapped "Spam": store the example and retrain.
|
||||
Future<void> markSpam({required String sender, required String text}) async {
|
||||
final key = MessageFilterText.normalize(text);
|
||||
if (key.isEmpty) return;
|
||||
_recentClean.removeWhere((e) => MessageFilterText.normalize(e.text) == key);
|
||||
_hamExamples.removeWhere((e) => MessageFilterText.normalize(e.text) == key);
|
||||
_addExample(_spamExamples, _example(sender, text), maxSpamExamples);
|
||||
Future<void> markSpam({required String sender, required String text}) =>
|
||||
markSpamMany([(sender: sender, text: text)]);
|
||||
|
||||
/// Marks several messages as spam with one save and one retrain (bulk
|
||||
/// selection in a chat).
|
||||
Future<void> markSpamMany(
|
||||
List<({String sender, String text})> messages,
|
||||
) async {
|
||||
var changed = false;
|
||||
for (final m in messages) {
|
||||
final key = MessageFilterText.normalize(m.text);
|
||||
if (key.isEmpty) continue;
|
||||
_recentClean.removeWhere(
|
||||
(e) => MessageFilterText.normalize(e.text) == key,
|
||||
);
|
||||
_hamExamples.removeWhere(
|
||||
(e) => MessageFilterText.normalize(e.text) == key,
|
||||
);
|
||||
_addExample(_spamExamples, _example(m.sender, m.text), maxSpamExamples);
|
||||
changed = true;
|
||||
}
|
||||
if (!changed) return;
|
||||
final training = _retrain();
|
||||
_notify();
|
||||
await _guardSave(() async {
|
||||
@@ -303,17 +319,27 @@ class MessageFilterService extends ChangeNotifier {
|
||||
required String channelId,
|
||||
required String sender,
|
||||
required String text,
|
||||
}) async {
|
||||
_tracker.allow(channelId, text);
|
||||
final key = MessageFilterText.normalize(text);
|
||||
if (key.isEmpty) {
|
||||
}) => markNotSpamMany([(channelId: channelId, sender: sender, text: text)]);
|
||||
|
||||
/// Marks several messages as not spam with one save and one retrain.
|
||||
Future<void> markNotSpamMany(
|
||||
List<({String channelId, String sender, String text})> messages,
|
||||
) async {
|
||||
var changed = false;
|
||||
for (final m in messages) {
|
||||
_tracker.allow(m.channelId, m.text);
|
||||
final key = MessageFilterText.normalize(m.text);
|
||||
if (key.isEmpty) continue;
|
||||
_spamExamples.removeWhere(
|
||||
(e) => MessageFilterText.normalize(e.text) == key,
|
||||
);
|
||||
_addExample(_hamExamples, _example(m.sender, m.text), maxNotSpamExamples);
|
||||
changed = true;
|
||||
}
|
||||
if (!changed) {
|
||||
_notify();
|
||||
return;
|
||||
}
|
||||
_spamExamples.removeWhere(
|
||||
(e) => MessageFilterText.normalize(e.text) == key,
|
||||
);
|
||||
_addExample(_hamExamples, _example(sender, text), maxNotSpamExamples);
|
||||
final training = _retrain();
|
||||
_notify();
|
||||
await _guardSave(() async {
|
||||
|
||||
@@ -95,6 +95,14 @@ class MessageRetryService extends ChangeNotifier {
|
||||
final Map<String, Message> _pendingMessages = {};
|
||||
final Map<String, Contact> _pendingContacts = {};
|
||||
final Map<String, List<PathSelection>> _attemptPathHistory = {};
|
||||
|
||||
/// Route failures of each pending message, held back until its fate is
|
||||
/// known: if any attempt is acknowledged the contact was reachable and the
|
||||
/// routes that timed out really failed; if nothing ever gets through the
|
||||
/// contact was probably just offline, and blaming its routes would wreck a
|
||||
/// good history.
|
||||
final Map<String, List<({int attempt, PathSelection selection})>>
|
||||
_deferredRouteFailures = {};
|
||||
final Map<String, List<AckHashMapping>> _ackHashToMessageId = {};
|
||||
final Map<String, List<int>> _expectedAckHashes = {};
|
||||
final List<_AckHistoryEntry> _ackHistory = [];
|
||||
@@ -618,6 +626,7 @@ class MessageRetryService extends ChangeNotifier {
|
||||
_pendingMessages.remove(messageId);
|
||||
_pendingContacts.remove(messageId);
|
||||
_attemptPathHistory.remove(messageId);
|
||||
_deferredRouteFailures.remove(messageId);
|
||||
_timeoutTimers.remove(messageId);
|
||||
_resolvedMessages.remove(messageId);
|
||||
// Cancellation (and other cleanup paths) must release the active in-flight
|
||||
@@ -653,13 +662,10 @@ class MessageRetryService extends ChangeNotifier {
|
||||
final backoffMs = 1000 * (1 << message.retryCount);
|
||||
|
||||
if (selection != null) {
|
||||
_recordPathResultFromMessage(
|
||||
contact.publicKeyHex,
|
||||
message,
|
||||
selection,
|
||||
false,
|
||||
null,
|
||||
);
|
||||
_deferredRouteFailures.putIfAbsent(messageId, () => []).add((
|
||||
attempt: message.retryCount,
|
||||
selection: selection,
|
||||
));
|
||||
}
|
||||
|
||||
final updatedMessage = message.copyWith(
|
||||
@@ -690,13 +696,19 @@ class MessageRetryService extends ChangeNotifier {
|
||||
config!.clearContactPath!(contact);
|
||||
}
|
||||
|
||||
_recordPathResultFromMessage(
|
||||
contact.publicKeyHex,
|
||||
message,
|
||||
selection,
|
||||
false,
|
||||
null,
|
||||
);
|
||||
// Nothing got through on any route: treat the contact as unreachable
|
||||
// and leave its routes' records alone. Only flood stats count the miss.
|
||||
// The held failures stay until the grace-period cleanup below, so a
|
||||
// late ACK still blames the routes that really failed.
|
||||
if (selection != null && selection.useFlood) {
|
||||
_recordPathResultFromMessage(
|
||||
contact.publicKeyHex,
|
||||
message,
|
||||
selection,
|
||||
false,
|
||||
null,
|
||||
);
|
||||
}
|
||||
|
||||
config?.updateMessage(failedMessage);
|
||||
|
||||
@@ -828,12 +840,29 @@ class MessageRetryService extends ChangeNotifier {
|
||||
);
|
||||
|
||||
final wasAlreadyResolved = _resolvedMessages.contains(matchedMessageId);
|
||||
final deferredFailures =
|
||||
_deferredRouteFailures.remove(matchedMessageId) ?? const [];
|
||||
|
||||
_cleanupMessage(matchedMessageId);
|
||||
|
||||
config?.updateMessage(deliveredMessage);
|
||||
|
||||
if (contact != null) {
|
||||
// The contact was reachable, so earlier attempts that timed out
|
||||
// really failed — except the attempt this (possibly late) ACK is for.
|
||||
// Without knowing which attempt was acknowledged, blame nothing.
|
||||
if (!ambiguousPath && matchedAttemptIndex != null) {
|
||||
for (final failure in deferredFailures) {
|
||||
if (failure.attempt == ackedAttempt) continue;
|
||||
_recordPathResultFromMessage(
|
||||
contact.publicKeyHex,
|
||||
message,
|
||||
failure.selection,
|
||||
false,
|
||||
null,
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!ambiguousPath) {
|
||||
_recordPathResultFromMessage(
|
||||
contact.publicKeyHex,
|
||||
@@ -948,6 +977,7 @@ class MessageRetryService extends ChangeNotifier {
|
||||
_pendingMessages.clear();
|
||||
_pendingContacts.clear();
|
||||
_attemptPathHistory.clear();
|
||||
_deferredRouteFailures.clear();
|
||||
_expectedAckHashes.clear();
|
||||
_ackHistory.clear();
|
||||
_ackHashToMessageId.clear();
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../connector/meshcore_connector.dart';
|
||||
import '../connector/meshcore_protocol.dart';
|
||||
import '../screens/channel_chat_screen.dart';
|
||||
import '../screens/chat_screen.dart';
|
||||
import 'notification_service.dart';
|
||||
|
||||
/// Opens the conversation behind a tapped message notification instead of
|
||||
/// leaving the user on whatever screen they last had open.
|
||||
///
|
||||
/// Only acts while a radio is connected: chats need its contacts/channels, and
|
||||
/// a cold start goes through the scanner anyway, so a stale tap is dropped.
|
||||
class NotificationNavigator {
|
||||
final GlobalKey<NavigatorState> navigatorKey;
|
||||
final MeshCoreConnector connector;
|
||||
final NotificationService notifications;
|
||||
|
||||
NotificationNavigator({
|
||||
required this.navigatorKey,
|
||||
required this.connector,
|
||||
required this.notifications,
|
||||
});
|
||||
|
||||
void attach() {
|
||||
notifications.pendingTap.addListener(_handleTap);
|
||||
_handleTap();
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
notifications.pendingTap.removeListener(_handleTap);
|
||||
}
|
||||
|
||||
void _handleTap() {
|
||||
final payload = notifications.pendingTap.value;
|
||||
if (payload == null) return;
|
||||
notifications.pendingTap.value = null;
|
||||
final navigator = navigatorKey.currentState;
|
||||
if (navigator == null || !connector.isConnected) return;
|
||||
|
||||
final sep = payload.indexOf(':');
|
||||
if (sep <= 0) return;
|
||||
final kind = payload.substring(0, sep);
|
||||
final value = payload.substring(sep + 1);
|
||||
|
||||
if (kind == 'message') {
|
||||
if (connector.activeContactKey == value) return;
|
||||
final contact = connector.getContactByPubKeyHex(value);
|
||||
if (contact == null ||
|
||||
(contact.type != advTypeChat && contact.type != advTypeRoom)) {
|
||||
return;
|
||||
}
|
||||
final unread = connector.getUnreadCountForContactKey(value);
|
||||
connector.markContactRead(value);
|
||||
navigator.push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) =>
|
||||
ChatScreen(contact: contact, initialUnreadCount: unread),
|
||||
),
|
||||
);
|
||||
} else if (kind == 'channel') {
|
||||
final index = int.tryParse(value);
|
||||
if (index == null || connector.activeChannelIndex == index) return;
|
||||
final channel = connector.channels
|
||||
.where((c) => c.index == index)
|
||||
.firstOrNull;
|
||||
if (channel == null) return;
|
||||
final unread = connector.getUnreadCountForChannelIndex(index);
|
||||
connector.markChannelRead(index);
|
||||
navigator.push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) =>
|
||||
ChannelChatScreen(channel: channel, initialUnreadCount: unread),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,9 @@ Future<void> notificationActionBackgroundHandler(
|
||||
final plugin = FlutterLocalNotificationsPlugin();
|
||||
await plugin.initialize(
|
||||
settings: const InitializationSettings(
|
||||
android: AndroidInitializationSettings('@mipmap/ic_launcher'),
|
||||
android: AndroidInitializationSettings(
|
||||
'@drawable/ic_stat_notification',
|
||||
),
|
||||
),
|
||||
);
|
||||
final l10n = await _backgroundLocalizations();
|
||||
@@ -168,7 +170,7 @@ Future<void> notificationActionBackgroundHandler(
|
||||
channelDescription: 'New message notifications',
|
||||
importance: Importance.high,
|
||||
priority: Priority.high,
|
||||
icon: '@mipmap/ic_launcher',
|
||||
icon: '@drawable/ic_stat_notification',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -92,6 +92,42 @@ class NotificationService {
|
||||
static const _minNotificationInterval = Duration(seconds: 3);
|
||||
static const _batchWindow = Duration(seconds: 5);
|
||||
|
||||
/// Messages for the same conversation that arrive within this window are
|
||||
/// posted as one notification update. A queue sync can deliver hundreds of
|
||||
/// messages in seconds; posting each one floods the shade and makes the
|
||||
/// phone sluggish (Android also drops updates past its rate limit).
|
||||
static const _coalesceDelay = Duration(milliseconds: 800);
|
||||
|
||||
/// While the radio's offline queue is syncing, sound/vibrate at most this
|
||||
/// often instead of every [_minNotificationInterval].
|
||||
static const _bulkSyncAlertInterval = Duration(seconds: 60);
|
||||
|
||||
/// Reports whether the connector is draining the radio's message queue.
|
||||
bool Function()? isBulkSyncActive;
|
||||
|
||||
/// Current unread total for the app badge. Coalesced conversation updates
|
||||
/// flush on independent timers, so a count captured when a message was
|
||||
/// queued can be older than one already posted by another conversation.
|
||||
int Function()? unreadTotalProvider;
|
||||
|
||||
/// Newest badge count seen on any queued message, when no provider is set.
|
||||
int? _latestQueuedBadgeCount;
|
||||
|
||||
final Map<String, List<_PendingNotification>> _pendingConversationUpdates =
|
||||
{};
|
||||
final Map<String, Timer> _conversationUpdateTimers = {};
|
||||
|
||||
/// Bumped whenever a conversation notification is cleared, so a post still
|
||||
/// awaiting permission/image lookup does not bring a read chat back.
|
||||
final Map<int, int> _clearGenerations = {};
|
||||
int _cancelAllGeneration = 0;
|
||||
|
||||
(int, int) _clearGenerationOf(int id) =>
|
||||
(_cancelAllGeneration, _clearGenerations[id] ?? 0);
|
||||
|
||||
void _bumpClearGeneration(int id) =>
|
||||
_clearGenerations[id] = (_clearGenerations[id] ?? 0) + 1;
|
||||
|
||||
DateTime? _lastNotificationTime;
|
||||
final List<_PendingNotification> _pendingNotifications = [];
|
||||
bool _isBatchingActive = false;
|
||||
@@ -102,6 +138,7 @@ class NotificationService {
|
||||
_suppressNotifications = suppress;
|
||||
if (suppress) {
|
||||
_pendingNotifications.clear();
|
||||
_dropAllPendingConversationUpdates();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +146,7 @@ class NotificationService {
|
||||
if (_isInitialized) return;
|
||||
|
||||
const androidSettings = AndroidInitializationSettings(
|
||||
'@mipmap/ic_launcher',
|
||||
'@drawable/ic_stat_notification',
|
||||
);
|
||||
const iosSettings = DarwinInitializationSettings(
|
||||
requestAlertPermission: true,
|
||||
@@ -395,7 +432,7 @@ class NotificationService {
|
||||
: 'New message notifications',
|
||||
importance: Importance.high,
|
||||
priority: Priority.high,
|
||||
icon: '@mipmap/ic_launcher',
|
||||
icon: '@drawable/ic_stat_notification',
|
||||
number: badgeCount,
|
||||
silent: silent,
|
||||
category: AndroidNotificationCategory.message,
|
||||
@@ -427,13 +464,22 @@ class NotificationService {
|
||||
String? senderName,
|
||||
int? badgeCount,
|
||||
bool silent = false,
|
||||
List<_PendingNotification> earlier = const [],
|
||||
}) async {
|
||||
final generation = _clearGenerationOf(id);
|
||||
if (!await _ensureCanNotify()) return;
|
||||
|
||||
// Only the newest messages fit in the notification anyway.
|
||||
final skipped = earlier.length > _maxConversationMessages
|
||||
? earlier.length - _maxConversationMessages
|
||||
: 0;
|
||||
final history = earlier.skip(skipped);
|
||||
|
||||
final imagePath = await _resolveNotificationImagePath(
|
||||
message,
|
||||
urlImagesEnabled: urlImagesEnabled,
|
||||
);
|
||||
if (_clearGenerationOf(id) != generation) return;
|
||||
final preview = formatNotificationText(message.trim(), _l10n);
|
||||
final body = preview.isEmpty
|
||||
? _l10n.notification_receivedNewMessage
|
||||
@@ -451,6 +497,23 @@ class NotificationService {
|
||||
..title = title
|
||||
..badgeCount = badgeCount
|
||||
..imagePath = imagePath;
|
||||
for (final prior in history) {
|
||||
final priorPreview = formatNotificationText(prior.body.trim(), _l10n);
|
||||
final priorSender = isChannel ? (prior.senderName ?? title) : title;
|
||||
conversation.add(
|
||||
Message(
|
||||
priorPreview.isEmpty
|
||||
? _l10n.notification_receivedNewMessage
|
||||
: priorPreview,
|
||||
DateTime.now(),
|
||||
Person(
|
||||
key: isChannel ? 'sender:$priorSender' : payload,
|
||||
name: priorSender,
|
||||
),
|
||||
),
|
||||
_maxConversationMessages,
|
||||
);
|
||||
}
|
||||
final sender = isChannel ? (senderName ?? title) : title;
|
||||
conversation.add(
|
||||
Message(
|
||||
@@ -556,7 +619,7 @@ class NotificationService {
|
||||
channelDescription: 'New message notifications',
|
||||
importance: Importance.high,
|
||||
priority: Priority.high,
|
||||
icon: '@mipmap/ic_launcher',
|
||||
icon: '@drawable/ic_stat_notification',
|
||||
),
|
||||
),
|
||||
payload: conversation?.payload,
|
||||
@@ -599,7 +662,7 @@ class NotificationService {
|
||||
channelDescription: 'New node advertisement notifications',
|
||||
importance: Importance.defaultImportance,
|
||||
priority: Priority.defaultPriority,
|
||||
icon: '@mipmap/ic_launcher',
|
||||
icon: '@drawable/ic_stat_notification',
|
||||
);
|
||||
|
||||
const iosDetails = DarwinNotificationDetails(
|
||||
@@ -655,7 +718,7 @@ class NotificationService {
|
||||
channelDescription: 'Low battery alerts for the connected device',
|
||||
importance: Importance.high,
|
||||
priority: Priority.high,
|
||||
icon: '@mipmap/ic_launcher',
|
||||
icon: '@drawable/ic_stat_notification',
|
||||
);
|
||||
|
||||
const darwinDetails = DarwinNotificationDetails(
|
||||
@@ -698,16 +761,48 @@ class NotificationService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Payload (`message:<key>` or `channel:<index>`) of the last tapped
|
||||
/// conversation notification, until [NotificationNavigator] consumes it.
|
||||
final ValueNotifier<String?> pendingTap = ValueNotifier<String?>(null);
|
||||
|
||||
void _onNotificationTapped(NotificationResponse response) {
|
||||
final payload = response.payload;
|
||||
if (payload != null) {
|
||||
debugPrint('Notification tapped: $payload');
|
||||
// Handle navigation based on payload
|
||||
// This can be extended to navigate to specific screens
|
||||
// Action buttons (reply, mark read, mute) are handled elsewhere; only a
|
||||
// tap on the notification body should open the conversation. Use the
|
||||
// response type, not actionId: the Windows plugin fills actionId with the
|
||||
// payload even for plain body clicks.
|
||||
if (payload == null ||
|
||||
response.notificationResponseType !=
|
||||
NotificationResponseType.selectedNotification) {
|
||||
return;
|
||||
}
|
||||
debugPrint('Notification tapped: $payload');
|
||||
if (payload.startsWith('message:') || payload.startsWith('channel:')) {
|
||||
pendingTap.value = payload;
|
||||
}
|
||||
}
|
||||
|
||||
static const String _radioKeyPrefsKey = 'notifications_radio_key';
|
||||
|
||||
/// Called when a radio connects. Notifications name conversations by
|
||||
/// contact key and channel *slot*; after switching radios a leftover
|
||||
/// channel notification would open (and mark read) whatever channel the
|
||||
/// new radio keeps in that slot, so a different radio clears them all.
|
||||
/// The key is persisted so this also holds across app restarts.
|
||||
Future<void> bindRadio(String radioKeyHex) async {
|
||||
String? previous;
|
||||
try {
|
||||
previous = PrefsManager.instance.getString(_radioKeyPrefsKey);
|
||||
await PrefsManager.instance.setString(_radioKeyPrefsKey, radioKeyHex);
|
||||
} catch (_) {}
|
||||
if (previous == null || previous == radioKeyHex) return;
|
||||
if (!await _ensureInitialized()) return;
|
||||
await cancelAll();
|
||||
}
|
||||
|
||||
Future<void> cancelAll() async {
|
||||
_cancelAllGeneration++;
|
||||
_dropAllPendingConversationUpdates();
|
||||
_conversations.clear();
|
||||
await _notifications.cancelAll();
|
||||
await _updateBadge(0);
|
||||
@@ -722,6 +817,8 @@ class NotificationService {
|
||||
String contactId,
|
||||
int totalUnreadCount,
|
||||
) async {
|
||||
_dropPendingConversationUpdate(_NotificationType.message, contactId);
|
||||
_bumpClearGeneration(contactId.hashCode);
|
||||
if (!await _ensureInitialized()) return;
|
||||
_conversations.remove(contactId.hashCode);
|
||||
await _notifications.cancel(id: contactId.hashCode);
|
||||
@@ -733,6 +830,11 @@ class NotificationService {
|
||||
int channelIndex,
|
||||
int totalUnreadCount,
|
||||
) async {
|
||||
_dropPendingConversationUpdate(
|
||||
_NotificationType.channelMessage,
|
||||
channelIndex.toString(),
|
||||
);
|
||||
_bumpClearGeneration(channelIndex.hashCode);
|
||||
if (!await _ensureInitialized()) return;
|
||||
_conversations.remove(channelIndex.hashCode);
|
||||
await _notifications.cancel(id: channelIndex.hashCode);
|
||||
@@ -860,10 +962,16 @@ class NotificationService {
|
||||
now.difference(_lastNotificationTime!) < _minNotificationInterval;
|
||||
|
||||
// Messages always update their conversation notification so the reply
|
||||
// action stays available; during a burst they update silently.
|
||||
// action stays available; bursts are coalesced and update silently.
|
||||
if (notification.type != _NotificationType.advert) {
|
||||
_showNotificationImmediately(notification, silent: throttled);
|
||||
if (!throttled) _lastNotificationTime = now;
|
||||
_latestQueuedBadgeCount =
|
||||
notification.badgeCount ?? _latestQueuedBadgeCount;
|
||||
final key = _conversationKey(notification.type, notification.id);
|
||||
(_pendingConversationUpdates[key] ??= []).add(notification);
|
||||
_conversationUpdateTimers[key] ??= Timer(
|
||||
_coalesceDelay,
|
||||
() => unawaited(_flushConversationUpdate(key)),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -890,6 +998,43 @@ class NotificationService {
|
||||
_lastNotificationTime = now;
|
||||
}
|
||||
|
||||
static String _conversationKey(_NotificationType type, String? id) =>
|
||||
'${type.name}:$id';
|
||||
|
||||
void _dropPendingConversationUpdate(_NotificationType type, String id) {
|
||||
final key = _conversationKey(type, id);
|
||||
_conversationUpdateTimers.remove(key)?.cancel();
|
||||
_pendingConversationUpdates.remove(key);
|
||||
}
|
||||
|
||||
void _dropAllPendingConversationUpdates() {
|
||||
for (final timer in _conversationUpdateTimers.values) {
|
||||
timer.cancel();
|
||||
}
|
||||
_conversationUpdateTimers.clear();
|
||||
_pendingConversationUpdates.clear();
|
||||
}
|
||||
|
||||
Future<void> _flushConversationUpdate(String key) async {
|
||||
_conversationUpdateTimers.remove(key);
|
||||
final batch = _pendingConversationUpdates.remove(key);
|
||||
if (batch == null || batch.isEmpty) return;
|
||||
final now = DateTime.now();
|
||||
final alertGap = (isBulkSyncActive?.call() ?? false)
|
||||
? _bulkSyncAlertInterval
|
||||
: _minNotificationInterval;
|
||||
final silent =
|
||||
_lastNotificationTime != null &&
|
||||
now.difference(_lastNotificationTime!) < alertGap;
|
||||
if (!silent) _lastNotificationTime = now;
|
||||
await _showNotificationImmediately(
|
||||
batch.last,
|
||||
silent: silent,
|
||||
earlier: batch.sublist(0, batch.length - 1),
|
||||
badgeCount: unreadTotalProvider?.call() ?? _latestQueuedBadgeCount,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _processBatch() async {
|
||||
_isBatchingActive = false;
|
||||
|
||||
@@ -912,7 +1057,10 @@ class NotificationService {
|
||||
Future<void> _showNotificationImmediately(
|
||||
_PendingNotification notification, {
|
||||
bool silent = false,
|
||||
List<_PendingNotification> earlier = const [],
|
||||
int? badgeCount,
|
||||
}) async {
|
||||
final badge = badgeCount ?? notification.badgeCount;
|
||||
try {
|
||||
switch (notification.type) {
|
||||
case _NotificationType.message:
|
||||
@@ -923,8 +1071,9 @@ class NotificationService {
|
||||
isChannel: false,
|
||||
message: notification.body,
|
||||
urlImagesEnabled: notification.urlImagesEnabled,
|
||||
badgeCount: notification.badgeCount,
|
||||
badgeCount: badge,
|
||||
silent: silent,
|
||||
earlier: earlier,
|
||||
);
|
||||
break;
|
||||
case _NotificationType.advert:
|
||||
@@ -946,8 +1095,9 @@ class NotificationService {
|
||||
message: notification.body,
|
||||
senderName: notification.senderName,
|
||||
urlImagesEnabled: notification.urlImagesEnabled,
|
||||
badgeCount: notification.badgeCount,
|
||||
badgeCount: badge,
|
||||
silent: silent,
|
||||
earlier: earlier,
|
||||
);
|
||||
break;
|
||||
}
|
||||
@@ -972,7 +1122,7 @@ class NotificationService {
|
||||
channelDescription: 'Batched notification summaries',
|
||||
importance: Importance.defaultImportance,
|
||||
priority: Priority.defaultPriority,
|
||||
icon: '@mipmap/ic_launcher',
|
||||
icon: '@drawable/ic_stat_notification',
|
||||
);
|
||||
|
||||
const notificationDetails = NotificationDetails(android: androidDetails);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import '../models/contact.dart';
|
||||
import '../models/path_history.dart';
|
||||
import '../models/path_selection.dart';
|
||||
import '../utils/coalesced_writes.dart';
|
||||
import 'route_chooser.dart';
|
||||
import 'storage_service.dart';
|
||||
|
||||
class PathHistoryService extends ChangeNotifier {
|
||||
final StorageService _storage;
|
||||
final Map<String, ContactPathHistory> _cache = {};
|
||||
final Map<String, int> _autoRotationIndex = {};
|
||||
final Map<String, _FloodStats> _floodStats = {};
|
||||
final Map<String, Future<void>> _pendingLoads = {};
|
||||
// A path record lands for most received messages, so saves are batched.
|
||||
@@ -24,10 +25,22 @@ class PathHistoryService extends ChangeNotifier {
|
||||
|
||||
static const int _maxHistoryEntries = 100;
|
||||
|
||||
/// A failing route is only deleted once it hasn't delivered for this long.
|
||||
static const Duration _forgetRouteAfter = Duration(days: 7);
|
||||
|
||||
int _version = 0;
|
||||
int get version => _version;
|
||||
|
||||
PathHistoryService(this._storage);
|
||||
final math.Random _random;
|
||||
final DateTime Function() _now;
|
||||
|
||||
/// [random] and [clock] are for tests: route picks are random by design.
|
||||
PathHistoryService(
|
||||
this._storage, {
|
||||
math.Random? random,
|
||||
DateTime Function()? clock,
|
||||
}) : _random = random ?? math.Random(),
|
||||
_now = clock ?? DateTime.now;
|
||||
|
||||
void setDevicePublicKey(String publicKeyHex) {
|
||||
// Queued saves use the storage key on entry, so they still land under
|
||||
@@ -36,7 +49,6 @@ class PathHistoryService extends ChangeNotifier {
|
||||
_storage.setPublicKeyHex = publicKeyHex;
|
||||
_cache.clear();
|
||||
_cacheAccessOrder.clear();
|
||||
_autoRotationIndex.clear();
|
||||
_floodStats.clear();
|
||||
_version++;
|
||||
notifyListeners();
|
||||
@@ -92,7 +104,8 @@ class PathHistoryService extends ChangeNotifier {
|
||||
double successIncrement = 0.5,
|
||||
double maxWeight = 5.0,
|
||||
}) {
|
||||
if (pathBytes.isEmpty || hopCount < 0) return;
|
||||
// A flood answered directly credits the direct (zero-hop) path.
|
||||
if (hopCount < 0 || (pathBytes.isEmpty && hopCount != 0)) return;
|
||||
if (!_cache.containsKey(contactPubKeyHex)) {
|
||||
_ensureLoaded(contactPubKeyHex).then((_) {
|
||||
if (!_cache.containsKey(contactPubKeyHex)) return;
|
||||
@@ -111,6 +124,8 @@ class PathHistoryService extends ChangeNotifier {
|
||||
final existing = _findPathRecord(contactPubKeyHex, pathBytes);
|
||||
final successCount = (existing?.successCount ?? 0) + 1;
|
||||
final failureCount = existing?.failureCount ?? 0;
|
||||
final now = _now();
|
||||
final faded = addRouteResult(existing, success: true, now: now);
|
||||
|
||||
final currentWeight = existing?.routeWeight ?? 1.0;
|
||||
final newWeight = (currentWeight + successIncrement).clamp(0.0, maxWeight);
|
||||
@@ -129,7 +144,10 @@ class PathHistoryService extends ChangeNotifier {
|
||||
successCount: successCount,
|
||||
failureCount: failureCount,
|
||||
routeWeight: newWeight,
|
||||
timestamp: DateTime.now(),
|
||||
timestamp: now,
|
||||
recentSuccess: faded.success,
|
||||
recentFailure: faded.failure,
|
||||
statsAt: now,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -176,6 +194,8 @@ class PathHistoryService extends ChangeNotifier {
|
||||
final existing = _findPathRecord(contactPubKeyHex, selection.pathBytes);
|
||||
final successCount = (existing?.successCount ?? 0) + (success ? 1 : 0);
|
||||
final failureCount = (existing?.failureCount ?? 0) + (success ? 0 : 1);
|
||||
final now = _now();
|
||||
final faded = addRouteResult(existing, success: success, now: now);
|
||||
|
||||
final currentWeight = existing?.routeWeight ?? 1.0;
|
||||
double newWeight;
|
||||
@@ -183,7 +203,14 @@ class PathHistoryService extends ChangeNotifier {
|
||||
newWeight = (currentWeight + successIncrement).clamp(0.0, maxWeight);
|
||||
} else {
|
||||
newWeight = currentWeight - failureDecrement;
|
||||
if (newWeight <= 0 && failureCount >= 3) {
|
||||
// Faded stats already push a failing route out of use, and a repeater
|
||||
// that is down for a day comes back; only forget a route that keeps
|
||||
// failing and hasn't delivered in a week. Route weight is bookkeeping
|
||||
// only now and plays no part in this.
|
||||
final lastWorked = existing?.timestamp;
|
||||
final longDead =
|
||||
lastWorked == null || now.difference(lastWorked) > _forgetRouteAfter;
|
||||
if (failureCount >= 3 && longDead) {
|
||||
removePathRecord(contactPubKeyHex, selection.pathBytes);
|
||||
return;
|
||||
}
|
||||
@@ -200,21 +227,31 @@ class PathHistoryService extends ChangeNotifier {
|
||||
successCount: successCount,
|
||||
failureCount: failureCount,
|
||||
routeWeight: newWeight,
|
||||
timestamp: success ? DateTime.now() : existing?.timestamp,
|
||||
timestamp: success ? now : existing?.timestamp,
|
||||
recentSuccess: faded.success,
|
||||
recentFailure: faded.failure,
|
||||
statsAt: now,
|
||||
);
|
||||
}
|
||||
|
||||
/// Route for one send attempt of a message to [contactPubKeyHex].
|
||||
///
|
||||
/// The last attempt always floods. Otherwise a known route is drawn by
|
||||
/// Thompson sampling over faded delivery stats, weighted by how well it
|
||||
/// fits [context]; routes used for this message's recent attempts score
|
||||
/// lower so retries usually try something different.
|
||||
PathSelection selectPathForAttempt(
|
||||
String contactPubKeyHex, {
|
||||
required int attemptIndex,
|
||||
required int maxRetries,
|
||||
List<PathSelection> recentSelections = const [],
|
||||
RouteContext context = RouteContext.unknown,
|
||||
}) {
|
||||
if (maxRetries <= 0 || attemptIndex >= maxRetries - 1) {
|
||||
return const PathSelection(pathBytes: [], hopCount: -1, useFlood: true);
|
||||
}
|
||||
|
||||
final ranked = _getRankedPaths(contactPubKeyHex);
|
||||
final ranked = _getRankedPaths(contactPubKeyHex, context: context);
|
||||
if (ranked.isEmpty) {
|
||||
return const PathSelection(pathBytes: [], hopCount: -1, useFlood: true);
|
||||
}
|
||||
@@ -225,20 +262,15 @@ class PathHistoryService extends ChangeNotifier {
|
||||
.where((selection) => !selection.useFlood)
|
||||
.map((selection) => selection.pathBytes)
|
||||
.toList();
|
||||
final candidates = recentPaths.isEmpty
|
||||
? ranked
|
||||
: ranked
|
||||
.where(
|
||||
(path) => !recentPaths.any(
|
||||
(recentPath) => _pathsEqual(path.pathBytes, recentPath),
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
final selected = candidates.isNotEmpty
|
||||
? (recentPaths.isEmpty
|
||||
? _selectRotatedCandidate(contactPubKeyHex, candidates)
|
||||
: candidates.first)
|
||||
: ranked.first;
|
||||
final selected = pickRoute(
|
||||
ranked,
|
||||
random: _random,
|
||||
now: _now(),
|
||||
context: context,
|
||||
triedThisMessage: (path) => recentPaths.any(
|
||||
(recentPath) => _pathsEqual(path.pathBytes, recentPath),
|
||||
),
|
||||
);
|
||||
|
||||
return PathSelection(
|
||||
pathBytes: selected.pathBytes,
|
||||
@@ -247,22 +279,6 @@ class PathHistoryService extends ChangeNotifier {
|
||||
);
|
||||
}
|
||||
|
||||
PathRecord _selectRotatedCandidate(
|
||||
String contactPubKeyHex,
|
||||
List<PathRecord> candidates,
|
||||
) {
|
||||
if (candidates.length <= 1) {
|
||||
_autoRotationIndex[contactPubKeyHex] = 0;
|
||||
return candidates.first;
|
||||
}
|
||||
|
||||
final currentIndex = _autoRotationIndex[contactPubKeyHex] ?? 0;
|
||||
final selectedIndex = currentIndex % candidates.length;
|
||||
_autoRotationIndex[contactPubKeyHex] =
|
||||
(selectedIndex + 1) % candidates.length;
|
||||
return candidates[selectedIndex];
|
||||
}
|
||||
|
||||
void _addPathRecord({
|
||||
required String contactPubKeyHex,
|
||||
required int hopCount,
|
||||
@@ -274,6 +290,9 @@ class PathHistoryService extends ChangeNotifier {
|
||||
double? routeWeight,
|
||||
double initialWeight = 1.0,
|
||||
DateTime? timestamp,
|
||||
double? recentSuccess,
|
||||
double? recentFailure,
|
||||
DateTime? statsAt,
|
||||
}) {
|
||||
void add() => _addPathRecordInternal(
|
||||
contactPubKeyHex,
|
||||
@@ -286,6 +305,9 @@ class PathHistoryService extends ChangeNotifier {
|
||||
routeWeight,
|
||||
initialWeight,
|
||||
timestamp,
|
||||
recentSuccess: recentSuccess,
|
||||
recentFailure: recentFailure,
|
||||
statsAt: statsAt,
|
||||
);
|
||||
|
||||
if (_cache.containsKey(contactPubKeyHex)) {
|
||||
@@ -324,8 +346,11 @@ class PathHistoryService extends ChangeNotifier {
|
||||
int failureCount,
|
||||
double? routeWeight,
|
||||
double initialWeight,
|
||||
DateTime? timestamp,
|
||||
) {
|
||||
DateTime? timestamp, {
|
||||
double? recentSuccess,
|
||||
double? recentFailure,
|
||||
DateTime? statsAt,
|
||||
}) {
|
||||
var history = _cache[contactPubKeyHex];
|
||||
if (history == null) return;
|
||||
_version++;
|
||||
@@ -339,6 +364,12 @@ class PathHistoryService extends ChangeNotifier {
|
||||
}
|
||||
wasFloodDiscovery = existing.wasFloodDiscovery || wasFloodDiscovery;
|
||||
timestamp ??= existing.timestamp;
|
||||
if (recentSuccess == null) {
|
||||
// Not a result: keep the faded stats as they were.
|
||||
recentSuccess = existing.recentSuccess;
|
||||
recentFailure = existing.recentFailure;
|
||||
statsAt = existing.statsAt;
|
||||
}
|
||||
}
|
||||
routeWeight ??= existing?.routeWeight ?? initialWeight;
|
||||
|
||||
@@ -351,6 +382,10 @@ class PathHistoryService extends ChangeNotifier {
|
||||
successCount: successCount,
|
||||
failureCount: failureCount,
|
||||
routeWeight: routeWeight,
|
||||
// A brand-new record starts with no faded results.
|
||||
recentSuccess: recentSuccess ?? 0,
|
||||
recentFailure: recentFailure ?? 0,
|
||||
statsAt: statsAt,
|
||||
);
|
||||
|
||||
final updatedPaths = List<PathRecord>.from(history.recentPaths);
|
||||
@@ -462,7 +497,6 @@ class PathHistoryService extends ChangeNotifier {
|
||||
Future<void> clearPathHistory(String contactPubKeyHex) async {
|
||||
_cache.remove(contactPubKeyHex);
|
||||
_cacheAccessOrder.remove(contactPubKeyHex);
|
||||
_autoRotationIndex.remove(contactPubKeyHex);
|
||||
_floodStats.remove(contactPubKeyHex);
|
||||
_writes.cancel(contactPubKeyHex);
|
||||
await _storage.clearPathHistory(contactPubKeyHex);
|
||||
@@ -502,34 +536,32 @@ class PathHistoryService extends ChangeNotifier {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<PathRecord> _getRankedPaths(String contactPubKeyHex) {
|
||||
List<PathRecord> _getRankedPaths(
|
||||
String contactPubKeyHex, {
|
||||
RouteContext context = RouteContext.unknown,
|
||||
}) {
|
||||
final history = _cache[contactPubKeyHex];
|
||||
if (history == null) return [];
|
||||
|
||||
// Records without hop bytes are unusable, except the direct path: zero
|
||||
// hops has no bytes by definition (issue #643: rotation never tried it).
|
||||
final ranked = List<PathRecord>.from(history.recentPaths)
|
||||
..removeWhere((p) => p.pathBytes.isEmpty);
|
||||
final fastestTripMs = _getFastestKnownTripMs(ranked);
|
||||
final highestRouteWeight = _getHighestKnownRouteWeight(ranked);
|
||||
..removeWhere((p) => p.pathBytes.isEmpty && p.hopCount != 0);
|
||||
final now = _now();
|
||||
final fastest = fastestTripMs(ranked);
|
||||
final scores = {
|
||||
for (final p in ranked)
|
||||
p: routeExpectedScore(
|
||||
p,
|
||||
now: now,
|
||||
fastestTripMs: fastest,
|
||||
context: context,
|
||||
),
|
||||
};
|
||||
|
||||
ranked.sort((a, b) {
|
||||
final scoreCompare =
|
||||
_scorePathRecord(
|
||||
b,
|
||||
fastestTripMs: fastestTripMs,
|
||||
highestRouteWeight: highestRouteWeight,
|
||||
).compareTo(
|
||||
_scorePathRecord(
|
||||
a,
|
||||
fastestTripMs: fastestTripMs,
|
||||
highestRouteWeight: highestRouteWeight,
|
||||
),
|
||||
);
|
||||
if (scoreCompare != 0) {
|
||||
return scoreCompare;
|
||||
}
|
||||
if (a.routeWeight != b.routeWeight) {
|
||||
return b.routeWeight.compareTo(a.routeWeight);
|
||||
}
|
||||
final scoreCompare = scores[b]!.compareTo(scores[a]!);
|
||||
if (scoreCompare != 0) return scoreCompare;
|
||||
final aTrip = a.tripTimeMs == 0 ? 999999 : a.tripTimeMs;
|
||||
final bTrip = b.tripTimeMs == 0 ? 999999 : b.tripTimeMs;
|
||||
if (aTrip != bTrip) return aTrip.compareTo(bTrip);
|
||||
@@ -542,58 +574,13 @@ class PathHistoryService extends ChangeNotifier {
|
||||
}
|
||||
|
||||
PathRecord _lowestScoredPath(List<PathRecord> paths) {
|
||||
final fastestTripMs = _getFastestKnownTripMs(paths);
|
||||
final highestRouteWeight = _getHighestKnownRouteWeight(paths);
|
||||
double score(PathRecord p) => _scorePathRecord(
|
||||
p,
|
||||
fastestTripMs: fastestTripMs,
|
||||
highestRouteWeight: highestRouteWeight,
|
||||
);
|
||||
final now = _now();
|
||||
final fastest = fastestTripMs(paths);
|
||||
double score(PathRecord p) =>
|
||||
routeExpectedScore(p, now: now, fastestTripMs: fastest);
|
||||
return paths.reduce((a, b) => score(b) < score(a) ? b : a);
|
||||
}
|
||||
|
||||
int? _getFastestKnownTripMs(List<PathRecord> paths) {
|
||||
final knownTrips = paths
|
||||
.where((path) => path.tripTimeMs > 0)
|
||||
.map((path) => path.tripTimeMs)
|
||||
.toList();
|
||||
if (knownTrips.isEmpty) return null;
|
||||
return knownTrips.reduce((a, b) => a < b ? a : b);
|
||||
}
|
||||
|
||||
double _getHighestKnownRouteWeight(List<PathRecord> paths) {
|
||||
if (paths.isEmpty) return 1.0;
|
||||
final highestWeight = paths
|
||||
.map((path) => path.routeWeight)
|
||||
.reduce((a, b) => a > b ? a : b);
|
||||
return highestWeight <= 0 ? 1.0 : highestWeight;
|
||||
}
|
||||
|
||||
double _scorePathRecord(
|
||||
PathRecord path, {
|
||||
required int? fastestTripMs,
|
||||
required double highestRouteWeight,
|
||||
}) {
|
||||
final totalAttempts = path.successCount + path.failureCount;
|
||||
final reliability = (path.successCount + 1) / (totalAttempts + 2);
|
||||
final latency = fastestTripMs == null || path.tripTimeMs <= 0
|
||||
? 0.6
|
||||
: (fastestTripMs / path.tripTimeMs).clamp(0.0, 1.0);
|
||||
final freshness = path.timestamp == null
|
||||
? 0.0
|
||||
: 1.0 /
|
||||
(1.0 +
|
||||
(DateTime.now().difference(path.timestamp!).inMinutes /
|
||||
60.0 /
|
||||
24.0));
|
||||
final routeWeight = (path.routeWeight / highestRouteWeight).clamp(0.0, 1.0);
|
||||
|
||||
return (reliability * 0.45) +
|
||||
(latency * 0.25) +
|
||||
(freshness * 0.1) +
|
||||
(routeWeight * 0.2);
|
||||
}
|
||||
|
||||
bool _pathsEqual(List<int> a, List<int> b) {
|
||||
return listEquals(a, b);
|
||||
}
|
||||
@@ -615,7 +602,6 @@ class PathHistoryService extends ChangeNotifier {
|
||||
while (_cache.length > _maxCachedContacts && _cacheAccessOrder.isNotEmpty) {
|
||||
final oldest = _cacheAccessOrder.removeAt(0);
|
||||
_cache.remove(oldest);
|
||||
_autoRotationIndex.remove(oldest);
|
||||
_floodStats.remove(oldest);
|
||||
}
|
||||
}
|
||||
@@ -632,7 +618,6 @@ class PathHistoryService extends ChangeNotifier {
|
||||
void clearAllHistories() {
|
||||
_cache.clear();
|
||||
_cacheAccessOrder.clear();
|
||||
_autoRotationIndex.clear();
|
||||
_floodStats.clear();
|
||||
_writes.dispose();
|
||||
_storage.clearAllPathHistories();
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import '../models/path_history.dart';
|
||||
import '../models/path_selection.dart';
|
||||
|
||||
/// Results lose half their weight every [routeStatsHalfLife], so a route's
|
||||
/// recent behaviour outweighs what it did weeks ago.
|
||||
const Duration routeStatsHalfLife = Duration(hours: 24);
|
||||
|
||||
/// Most results a route's faded stats hold. Fading is by time, so a route
|
||||
/// used constantly would otherwise pile up so many successes that it takes
|
||||
/// dozens of failures to lose its rank after its repeater dies; the cap
|
||||
/// keeps it to a handful.
|
||||
const double routeEvidenceCap = 16;
|
||||
|
||||
/// Multiplier for a route that fits what the radio hears right now (its
|
||||
/// first hop, or the contact itself for the direct route, was heard).
|
||||
const double routeContextFitBonus = 1.15;
|
||||
|
||||
/// Multiplier for a route that doesn't fit what the radio hears right now.
|
||||
/// Soft on purpose: not hearing a repeater is weak evidence it's gone.
|
||||
const double routeContextMissPenalty = 0.6;
|
||||
|
||||
/// Small bonus for the path the radio itself currently holds.
|
||||
const double routeRadioPathBonus = 1.05;
|
||||
|
||||
/// Score multiplier for a route already tried for the same message: retries
|
||||
/// lean toward something different without wasting the attempt on a route
|
||||
/// much weaker than the one that just missed.
|
||||
const double routeRetryRepeatPenalty = 0.5;
|
||||
|
||||
/// Share of the score that comes from speed; the rest is delivery odds.
|
||||
const double _speedShare = 0.15;
|
||||
|
||||
/// Fraction of a result's weight left after the time from [since] to [now].
|
||||
double routeDecayFactor(DateTime? since, DateTime now) {
|
||||
if (since == null) return 1.0;
|
||||
final seconds = now.difference(since).inSeconds;
|
||||
if (seconds <= 0) return 1.0;
|
||||
return math.pow(0.5, seconds / routeStatsHalfLife.inSeconds).toDouble();
|
||||
}
|
||||
|
||||
/// [record]'s faded delivery and failure counts as of [now].
|
||||
({double success, double failure}) fadedRouteStats(
|
||||
PathRecord record,
|
||||
DateTime now,
|
||||
) {
|
||||
final f = routeDecayFactor(record.statsAt, now);
|
||||
return (success: record.recentSuccess * f, failure: record.recentFailure * f);
|
||||
}
|
||||
|
||||
/// Faded counts after adding one result to [record] (or to a new route when
|
||||
/// it is null) at [now].
|
||||
({double success, double failure}) addRouteResult(
|
||||
PathRecord? record, {
|
||||
required bool success,
|
||||
required DateTime now,
|
||||
}) {
|
||||
final faded = record == null
|
||||
? (success: 0.0, failure: 0.0)
|
||||
: fadedRouteStats(record, now);
|
||||
var s = faded.success + (success ? 1 : 0);
|
||||
var f = faded.failure + (success ? 0 : 1);
|
||||
final total = s + f;
|
||||
if (total > routeEvidenceCap) {
|
||||
final scale = routeEvidenceCap / total;
|
||||
s *= scale;
|
||||
f *= scale;
|
||||
}
|
||||
return (success: s, failure: f);
|
||||
}
|
||||
|
||||
/// How well [record] fits what the radio hears right now.
|
||||
double routeContextFactor(PathRecord record, RouteContext context) {
|
||||
var factor = 1.0;
|
||||
final radioPath = context.radioPath;
|
||||
if (radioPath != null &&
|
||||
radioPath.length == record.pathBytes.length &&
|
||||
_sameBytes(radioPath, record.pathBytes)) {
|
||||
factor *= routeRadioPathBonus;
|
||||
}
|
||||
if (!context.hasNeighbourInfo) return factor;
|
||||
final fits = record.hopCount == 0
|
||||
? context.contactHeardDirectly
|
||||
: context.firstHopHeard(record.pathBytes, record.hashWidth);
|
||||
return factor * (fits ? routeContextFitBonus : routeContextMissPenalty);
|
||||
}
|
||||
|
||||
double _speedFactor(PathRecord record, int? fastestTripMs) {
|
||||
final speed = fastestTripMs == null || record.tripTimeMs <= 0
|
||||
? 0.6
|
||||
: (fastestTripMs / record.tripTimeMs).clamp(0.0, 1.0);
|
||||
return (1 - _speedShare) + _speedShare * speed;
|
||||
}
|
||||
|
||||
/// Fastest known trip time among [records], or null when none is known.
|
||||
int? fastestTripMs(Iterable<PathRecord> records) {
|
||||
int? best;
|
||||
for (final r in records) {
|
||||
if (r.tripTimeMs > 0 && (best == null || r.tripTimeMs < best)) {
|
||||
best = r.tripTimeMs;
|
||||
}
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
||||
/// Deterministic rank: expected delivery odds (faded), adjusted for speed
|
||||
/// and context. Used for ordering lists and choosing what to evict.
|
||||
double routeExpectedScore(
|
||||
PathRecord record, {
|
||||
required DateTime now,
|
||||
required int? fastestTripMs,
|
||||
RouteContext context = RouteContext.unknown,
|
||||
}) {
|
||||
final stats = fadedRouteStats(record, now);
|
||||
final mean = (stats.success + 1) / (stats.success + stats.failure + 2);
|
||||
return mean *
|
||||
_speedFactor(record, fastestTripMs) *
|
||||
routeContextFactor(record, context);
|
||||
}
|
||||
|
||||
/// Thompson sampling: draws plausible delivery odds for each route from what
|
||||
/// is known about it and returns the route with the best draw. Proven routes
|
||||
/// win most of the time; uncertain ones are still tried now and then, so a
|
||||
/// route that starts working again gets noticed.
|
||||
PathRecord pickRoute(
|
||||
List<PathRecord> candidates, {
|
||||
required math.Random random,
|
||||
required DateTime now,
|
||||
RouteContext context = RouteContext.unknown,
|
||||
bool Function(PathRecord record)? triedThisMessage,
|
||||
}) {
|
||||
assert(candidates.isNotEmpty);
|
||||
final fastest = fastestTripMs(candidates);
|
||||
PathRecord? best;
|
||||
var bestScore = -1.0;
|
||||
for (final record in candidates) {
|
||||
final stats = fadedRouteStats(record, now);
|
||||
final draw = sampleBeta(random, stats.success + 1, stats.failure + 1);
|
||||
final score =
|
||||
draw *
|
||||
_speedFactor(record, fastest) *
|
||||
routeContextFactor(record, context) *
|
||||
(triedThisMessage?.call(record) == true
|
||||
? routeRetryRepeatPenalty
|
||||
: 1.0);
|
||||
if (score > bestScore) {
|
||||
bestScore = score;
|
||||
best = record;
|
||||
}
|
||||
}
|
||||
return best!;
|
||||
}
|
||||
|
||||
/// A sample from Beta([a], [b]), both > 0.
|
||||
double sampleBeta(math.Random random, double a, double b) {
|
||||
final x = _sampleGamma(random, a);
|
||||
final y = _sampleGamma(random, b);
|
||||
final sum = x + y;
|
||||
return sum <= 0 ? 0.5 : x / sum;
|
||||
}
|
||||
|
||||
/// Gamma(shape, 1) by Marsaglia–Tsang; shapes below 1 use the boost
|
||||
/// Gamma(a) = Gamma(a + 1) * U^(1/a).
|
||||
double _sampleGamma(math.Random random, double shape) {
|
||||
if (shape < 1) {
|
||||
final u = random.nextDouble();
|
||||
return _sampleGamma(random, shape + 1) * math.pow(u, 1 / shape);
|
||||
}
|
||||
final d = shape - 1 / 3;
|
||||
final c = 1 / math.sqrt(9 * d);
|
||||
while (true) {
|
||||
double x;
|
||||
double v;
|
||||
do {
|
||||
x = _sampleNormal(random);
|
||||
v = 1 + c * x;
|
||||
} while (v <= 0);
|
||||
v = v * v * v;
|
||||
final u = random.nextDouble();
|
||||
if (u < 1 - 0.0331 * x * x * x * x) return d * v;
|
||||
if (math.log(u) < 0.5 * x * x + d * (1 - v + math.log(v))) return d * v;
|
||||
}
|
||||
}
|
||||
|
||||
double _sampleNormal(math.Random random) {
|
||||
// Box–Muller; 1 - nextDouble() avoids log(0).
|
||||
final u1 = 1 - random.nextDouble();
|
||||
final u2 = random.nextDouble();
|
||||
return math.sqrt(-2 * math.log(u1)) * math.cos(2 * math.pi * u2);
|
||||
}
|
||||
|
||||
bool _sameBytes(List<int> a, List<int> b) {
|
||||
for (var i = 0; i < a.length; i++) {
|
||||
if (a[i] != b[i]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import '../utils/platform_info.dart';
|
||||
|
||||
/// Dart half of Android's scrolling screenshot ("Capture more").
|
||||
///
|
||||
/// The native `FlutterScrollCapture` asks for the main scrollable on screen,
|
||||
/// then has it scrolled strip by strip while it copies pixels. All sizes on
|
||||
/// the channel are physical pixels in the Flutter view.
|
||||
class ScrollCaptureService {
|
||||
ScrollCaptureService._();
|
||||
|
||||
static const MethodChannel _channel = MethodChannel(
|
||||
'meshcore_open/scroll_capture',
|
||||
);
|
||||
|
||||
static ScrollableState? _target;
|
||||
static double _startPixels = 0;
|
||||
|
||||
static void initialize() {
|
||||
if (kIsWeb || !PlatformInfo.isAndroid) return;
|
||||
_channel.setMethodCallHandler(_handle);
|
||||
}
|
||||
|
||||
static Future<Object?> _handle(MethodCall call) async {
|
||||
switch (call.method) {
|
||||
case 'search':
|
||||
return _search();
|
||||
case 'start':
|
||||
_startPixels = _target?.position.pixels ?? 0;
|
||||
return null;
|
||||
case 'scroll':
|
||||
final args = call.arguments as Map<Object?, Object?>;
|
||||
return _scrollTo((args['top'] as num).toDouble());
|
||||
case 'end':
|
||||
final target = _target;
|
||||
_target = null;
|
||||
if (target != null && target.mounted) {
|
||||
target.position.jumpTo(_startPixels);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static FlutterView? get _view =>
|
||||
WidgetsBinding.instance.platformDispatcher.implicitView;
|
||||
|
||||
/// The largest vertically scrollable, user-visible list on the top route.
|
||||
static Map<String, int>? _search() {
|
||||
final view = _view;
|
||||
final root = WidgetsBinding.instance.rootElement;
|
||||
if (view == null || root == null) return null;
|
||||
final dpr = view.devicePixelRatio;
|
||||
final screen = Offset.zero & (view.physicalSize / dpr);
|
||||
|
||||
ScrollableState? best;
|
||||
Rect? bestRect;
|
||||
void visit(Element element) {
|
||||
if (element is StatefulElement && element.state is ScrollableState) {
|
||||
final state = element.state as ScrollableState;
|
||||
final rect = _candidateRect(state, element.renderObject, screen, view);
|
||||
if (rect != null &&
|
||||
(bestRect == null ||
|
||||
rect.width * rect.height >=
|
||||
bestRect!.width * bestRect!.height)) {
|
||||
best = state;
|
||||
bestRect = rect;
|
||||
}
|
||||
}
|
||||
element.visitChildren(visit);
|
||||
}
|
||||
|
||||
root.visitChildren(visit);
|
||||
final rect = bestRect;
|
||||
_target = best;
|
||||
if (best == null || rect == null) return null;
|
||||
return {
|
||||
'left': (rect.left * dpr).round(),
|
||||
'top': (rect.top * dpr).round(),
|
||||
'right': (rect.right * dpr).round(),
|
||||
'bottom': (rect.bottom * dpr).round(),
|
||||
};
|
||||
}
|
||||
|
||||
static Rect? _candidateRect(
|
||||
ScrollableState state,
|
||||
RenderObject? renderObject,
|
||||
Rect screen,
|
||||
FlutterView view,
|
||||
) {
|
||||
if (axisDirectionToAxis(state.axisDirection) != Axis.vertical) return null;
|
||||
final position = state.position;
|
||||
if (!position.hasContentDimensions ||
|
||||
position.maxScrollExtent <= position.minScrollExtent) {
|
||||
return null;
|
||||
}
|
||||
if (renderObject is! RenderBox ||
|
||||
!renderObject.attached ||
|
||||
!renderObject.hasSize) {
|
||||
return null;
|
||||
}
|
||||
final rect = MatrixUtils.transformRect(
|
||||
renderObject.getTransformTo(null),
|
||||
Offset.zero & renderObject.size,
|
||||
).intersect(screen);
|
||||
if (rect.isEmpty || rect.height < 100) return null;
|
||||
// Only a list the user can actually see: the topmost hit at its centre
|
||||
// must be inside it (rules out lists on routes underneath, or covered
|
||||
// by a sheet or dialog).
|
||||
final result = HitTestResult();
|
||||
WidgetsBinding.instance.hitTestInView(result, rect.center, view.viewId);
|
||||
if (!result.path.any((entry) => entry.target == renderObject)) return null;
|
||||
return rect;
|
||||
}
|
||||
|
||||
/// Scrolls so the strip starting [top] physical px below the start
|
||||
/// position's top edge is at the top of the list, as far as the content
|
||||
/// allows. Returns how far it actually moved, in physical px.
|
||||
static Future<double> _scrollTo(double top) async {
|
||||
final target = _target;
|
||||
final view = _view;
|
||||
if (target == null || !target.mounted || view == null) return 0;
|
||||
final dpr = view.devicePixelRatio;
|
||||
final position = target.position;
|
||||
// In a reversed list (the chat transcript) moving down the screen means
|
||||
// smaller scroll offsets.
|
||||
final up = target.axisDirection == AxisDirection.up;
|
||||
final delta = top / dpr;
|
||||
final wanted = (up ? _startPixels - delta : _startPixels + delta).clamp(
|
||||
position.minScrollExtent,
|
||||
position.maxScrollExtent,
|
||||
);
|
||||
position.jumpTo(wanted);
|
||||
// Bounded: if frames are not being produced (app no longer resumed),
|
||||
// waiting forever would leave the native capture request hanging.
|
||||
for (var i = 0; i < 2; i++) {
|
||||
await WidgetsBinding.instance.endOfFrame.timeout(
|
||||
const Duration(milliseconds: 250),
|
||||
onTimeout: () {},
|
||||
);
|
||||
}
|
||||
if (!target.mounted) return 0;
|
||||
final moved = up
|
||||
? _startPixels - position.pixels
|
||||
: position.pixels - _startPixels;
|
||||
return moved * dpr;
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,15 @@ class ChatSearchResults extends StatefulWidget {
|
||||
final Future<List<ChatSearchEntry>> Function() loadEntries;
|
||||
final double textScale;
|
||||
|
||||
/// Tapping a result: the chat closes search and jumps to the message.
|
||||
final ValueChanged<ChatSearchEntry>? onSelect;
|
||||
|
||||
const ChatSearchResults({
|
||||
super.key,
|
||||
required this.query,
|
||||
required this.loadEntries,
|
||||
this.textScale = 1.0,
|
||||
this.onSelect,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -116,6 +120,9 @@ class _ChatSearchResultsState extends State<ChatSearchResults> {
|
||||
entry: _results[index],
|
||||
needle: needle,
|
||||
textScale: scale,
|
||||
onTap: widget.onSelect == null
|
||||
? null
|
||||
: () => widget.onSelect!(_results[index]),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -128,11 +135,13 @@ class _ResultRow extends StatelessWidget {
|
||||
final ChatSearchEntry entry;
|
||||
final String needle;
|
||||
final double textScale;
|
||||
final VoidCallback? onTap;
|
||||
|
||||
const _ResultRow({
|
||||
required this.entry,
|
||||
required this.needle,
|
||||
required this.textScale,
|
||||
this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -145,44 +154,47 @@ class _ResultRow extends StatelessWidget {
|
||||
: entry.text;
|
||||
// Show whichever text actually contains the query.
|
||||
final shown = body.toLowerCase().contains(needle) ? body : entry.text;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _highlight(
|
||||
entry.sender,
|
||||
entry.matchSender ? needle : '',
|
||||
TextStyle(
|
||||
fontSize: 14 * s,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: scheme.primary,
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _highlight(
|
||||
entry.sender,
|
||||
entry.matchSender ? needle : '',
|
||||
TextStyle(
|
||||
fontSize: 14 * s,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: scheme.primary,
|
||||
),
|
||||
scheme,
|
||||
),
|
||||
scheme,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'${formatChatDayLabel(context, entry.time)}, '
|
||||
'${formatChatTime(context, entry.time)}',
|
||||
style: TextStyle(
|
||||
fontSize: 12 * s,
|
||||
color: scheme.onSurfaceVariant,
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'${formatChatDayLabel(context, entry.time)}, '
|
||||
'${formatChatTime(context, entry.time)}',
|
||||
style: TextStyle(
|
||||
fontSize: 12 * s,
|
||||
color: scheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
_highlight(
|
||||
shown,
|
||||
needle,
|
||||
TextStyle(fontSize: 16 * s, color: scheme.onSurface),
|
||||
scheme,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
_highlight(
|
||||
shown,
|
||||
needle,
|
||||
TextStyle(fontSize: 16 * s, color: scheme.onSurface),
|
||||
scheme,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -163,6 +163,35 @@ void copyChatMessageText(BuildContext context, String text) {
|
||||
);
|
||||
}
|
||||
|
||||
/// Asks before deleting [count] selected messages from this device.
|
||||
Future<bool> confirmBulkDelete(BuildContext context, int count) async {
|
||||
final result = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
final l10n = dialogContext.l10n;
|
||||
return AlertDialog(
|
||||
title: Text(l10n.chat_deleteSelectedTitle),
|
||||
content: Text(l10n.chat_deleteSelectedConfirm(count)),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(dialogContext, false),
|
||||
child: Text(l10n.common_cancel),
|
||||
),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: Theme.of(dialogContext).colorScheme.error,
|
||||
foregroundColor: Theme.of(dialogContext).colorScheme.onError,
|
||||
),
|
||||
onPressed: () => Navigator.pop(dialogContext, true),
|
||||
child: Text(l10n.common_delete),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
return result ?? false;
|
||||
}
|
||||
|
||||
/// Asks before clearing a transcript. [message] says what will be erased.
|
||||
Future<bool> confirmClearChat(
|
||||
BuildContext context, {
|
||||
|
||||
@@ -25,6 +25,9 @@ class NetworkMapOnlineController extends ChangeNotifier {
|
||||
|
||||
final NetworkMapApiClient _client;
|
||||
final LayerHitNotifier<NetworkMapRepeater> hitNotifier = ValueNotifier(null);
|
||||
final LayerHitNotifier<NetworkMapRepeater> dotHitNotifier = ValueNotifier(
|
||||
null,
|
||||
);
|
||||
|
||||
List<NetworkMapRepeater> _repeaters = const [];
|
||||
List<NetworkMapLink> _links = const [];
|
||||
@@ -98,6 +101,7 @@ class NetworkMapOnlineController extends ChangeNotifier {
|
||||
_disposed = true;
|
||||
_timer?.cancel();
|
||||
hitNotifier.dispose();
|
||||
dotHitNotifier.dispose();
|
||||
_client.close();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -117,6 +121,16 @@ const int networkMapDenseNodeCount = 30;
|
||||
/// Above this many in-view links, each line is one stroke at half width
|
||||
const int networkMapDenseLinkCount = 70;
|
||||
|
||||
/// Above this many in-view repeaters, each is painted as a plain dot in one
|
||||
/// layer instead of its own marker widget. A zoomed-out view of a dense mesh
|
||||
/// (e.g. Moscow) holds thousands of repeaters; one widget subtree each was
|
||||
/// enough to run mid-range phones out of memory and crash the app.
|
||||
const int networkMapMarkerWidgetLimit = 250;
|
||||
|
||||
/// Above this many in-view links, links are not drawn at all until the user
|
||||
/// zooms in; thousands of overlapping lines are unreadable and costly.
|
||||
const int networkMapMaxLinkCount = 1500;
|
||||
|
||||
/// Full style is a 3.5 px confirmed stroke or a 2.5 px unconfirmed stroke,
|
||||
/// each with a 1 px border. Simple style keeps the pattern and drops the
|
||||
/// border, so the painter records the line once, at half the stroke width.
|
||||
@@ -126,9 +140,13 @@ Polyline _onlineLinkPolyline(NetworkMapLink link, {required bool simple}) {
|
||||
return Polyline(
|
||||
points: [link.aCell.center, link.bCell.center],
|
||||
strokeWidth: simple ? strokeWidth / 2 : strokeWidth,
|
||||
color: MapPalette.router.withValues(alpha: confirmed ? 0.85 : 0.6),
|
||||
// Keep links opaque. flutter_map draws a translucent line that also has
|
||||
// a border through a full-viewport saveLayer, once per line; with dozens
|
||||
// of links that exhausted GPU memory and crashed the Impeller (Vulkan)
|
||||
// raster thread in Canvas::DrawLine on Android.
|
||||
color: MapPalette.router,
|
||||
borderStrokeWidth: simple ? 0 : 1,
|
||||
borderColor: MapPalette.markerOutline.withValues(alpha: 0.7),
|
||||
borderColor: MapPalette.markerOutline,
|
||||
pattern: confirmed
|
||||
? const StrokePattern.solid()
|
||||
: StrokePattern.dashed(segments: const [10, 8]),
|
||||
@@ -151,12 +169,18 @@ List<Widget> buildNetworkMapOnlineLayers({
|
||||
final visibleKeys = {for (final repeater in visibleRepeaters) repeater.key};
|
||||
final links = [
|
||||
for (final link in controller.links)
|
||||
if (visibleKeys.contains(link.a) && visibleKeys.contains(link.b)) link,
|
||||
if (visibleKeys.contains(link.a) &&
|
||||
visibleKeys.contains(link.b) &&
|
||||
// Both ends in one cell: a zero-length line draws nothing useful
|
||||
// and is a degenerate stroke for the renderer.
|
||||
link.aCell.center != link.bCell.center)
|
||||
link,
|
||||
];
|
||||
final dropHexagons = visibleRepeaters.length > networkMapDenseNodeCount;
|
||||
final simpleLines = links.length > networkMapDenseLinkCount;
|
||||
final useDots = visibleRepeaters.length > networkMapMarkerWidgetLimit;
|
||||
return [
|
||||
if (showLinks)
|
||||
if (showLinks && links.length <= networkMapMaxLinkCount)
|
||||
PolylineLayer(
|
||||
polylines: [
|
||||
for (final link in links)
|
||||
@@ -191,46 +215,69 @@ List<Widget> buildNetworkMapOnlineLayers({
|
||||
],
|
||||
),
|
||||
),
|
||||
MarkerLayer(
|
||||
markers: [
|
||||
for (final repeater in visibleRepeaters)
|
||||
if (!localMarkerKeys.contains(repeater.key))
|
||||
Marker(
|
||||
point: repeater.cell.center,
|
||||
width: 34,
|
||||
height: 34,
|
||||
child: GestureDetector(
|
||||
onTap: () => onTap(repeater),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: networkMapStatusColor(repeater.status),
|
||||
border: Border.all(
|
||||
color: MapPalette.markerOutline,
|
||||
width: 2.5,
|
||||
if (useDots)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
final hits = controller.dotHitNotifier.value?.hitValues;
|
||||
if (hits != null && hits.isNotEmpty) onTap(hits.first);
|
||||
},
|
||||
child: CircleLayer<NetworkMapRepeater>(
|
||||
hitNotifier: controller.dotHitNotifier,
|
||||
circles: [
|
||||
for (final repeater in visibleRepeaters)
|
||||
if (!localMarkerKeys.contains(repeater.key))
|
||||
CircleMarker<NetworkMapRepeater>(
|
||||
point: repeater.cell.center,
|
||||
radius: 7,
|
||||
color: networkMapStatusColor(repeater.status),
|
||||
borderColor: MapPalette.markerOutline,
|
||||
borderStrokeWidth: 1.5,
|
||||
hitValue: repeater,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
else
|
||||
MarkerLayer(
|
||||
markers: [
|
||||
for (final repeater in visibleRepeaters)
|
||||
if (!localMarkerKeys.contains(repeater.key))
|
||||
Marker(
|
||||
point: repeater.cell.center,
|
||||
width: 34,
|
||||
height: 34,
|
||||
child: GestureDetector(
|
||||
onTap: () => onTap(repeater),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: networkMapStatusColor(repeater.status),
|
||||
border: Border.all(
|
||||
color: MapPalette.markerOutline,
|
||||
width: 2.5,
|
||||
),
|
||||
boxShadow: dropHexagons
|
||||
? null
|
||||
: const [
|
||||
BoxShadow(
|
||||
color: MapPalette.markerShadow,
|
||||
blurRadius: 6,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(
|
||||
repeater.type == advTypeRoom
|
||||
? Icons.meeting_room
|
||||
: Icons.router,
|
||||
color: MapPalette.markerOutline,
|
||||
size: 20,
|
||||
),
|
||||
boxShadow: dropHexagons
|
||||
? null
|
||||
: const [
|
||||
BoxShadow(
|
||||
color: MapPalette.markerShadow,
|
||||
blurRadius: 6,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(
|
||||
repeater.type == advTypeRoom
|
||||
? Icons.meeting_room
|
||||
: Icons.router,
|
||||
color: MapPalette.markerOutline,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -304,6 +304,11 @@ class PathMapBottomPanel extends StatelessWidget {
|
||||
final Widget? summary;
|
||||
final Widget hopList;
|
||||
|
||||
/// Grows the panel to the full map height so the hop list is readable when
|
||||
/// the map is of little use (e.g. repeaters without locations).
|
||||
final bool expanded;
|
||||
final VoidCallback? onToggleExpanded;
|
||||
|
||||
const PathMapBottomPanel({
|
||||
super.key,
|
||||
required this.header,
|
||||
@@ -322,6 +327,8 @@ class PathMapBottomPanel extends StatelessWidget {
|
||||
required this.hopRowCount,
|
||||
required this.summary,
|
||||
required this.hopList,
|
||||
this.expanded = false,
|
||||
this.onToggleExpanded,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -330,9 +337,10 @@ class PathMapBottomPanel extends StatelessWidget {
|
||||
final maxHeight =
|
||||
MediaQuery.of(context).size.height * (combined ? 0.45 : 0.35);
|
||||
const hopRowHeight = 60.0;
|
||||
final isExpanded = expanded && !collapsed && onToggleExpanded != null;
|
||||
|
||||
double? cardHeight;
|
||||
if (!collapsed) {
|
||||
if (!collapsed && !isExpanded) {
|
||||
final summaryHeight = combined ? 34.0 + pathCount * 40.0 : 0.0;
|
||||
final noteHeight = showNoSelfGpsNote ? 22.0 : 0.0;
|
||||
final estimatedHeight =
|
||||
@@ -347,6 +355,7 @@ class PathMapBottomPanel extends StatelessWidget {
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 16,
|
||||
top: isExpanded ? 16 : null,
|
||||
child: SizedBox(
|
||||
height: cardHeight,
|
||||
child: Container(
|
||||
@@ -380,66 +389,95 @@ class PathMapBottomPanel extends StatelessWidget {
|
||||
children: [
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: max(
|
||||
0.0,
|
||||
constraints.maxHeight -
|
||||
(collapsed ? 0.0 : hopRowHeight + 1.0),
|
||||
),
|
||||
maxHeight: isExpanded
|
||||
? constraints.maxHeight * 0.4
|
||||
: max(
|
||||
0.0,
|
||||
constraints.maxHeight -
|
||||
(collapsed
|
||||
? 0.0
|
||||
: hopRowHeight + 1.0),
|
||||
),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
12,
|
||||
8,
|
||||
4,
|
||||
0,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
header,
|
||||
const SizedBox(height: 4),
|
||||
PathMiniLegend(
|
||||
combined: combined,
|
||||
showInferred:
|
||||
showInferredLegend,
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onVerticalDragEnd: (details) =>
|
||||
_handleHeaderDrag(
|
||||
details.primaryVelocity ?? 0,
|
||||
isExpanded,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
12,
|
||||
8,
|
||||
4,
|
||||
0,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
header,
|
||||
const SizedBox(height: 4),
|
||||
PathMiniLegend(
|
||||
combined: combined,
|
||||
showInferred:
|
||||
showInferredLegend,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (onToggleExpanded != null &&
|
||||
!collapsed)
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
isExpanded
|
||||
? Icons.close_fullscreen
|
||||
: Icons.open_in_full,
|
||||
),
|
||||
],
|
||||
color: MeshPalette.ink,
|
||||
tooltip: isExpanded
|
||||
? l10n.pathMap_showMap
|
||||
: l10n.pathMap_expandHopList,
|
||||
onPressed: onToggleExpanded,
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
collapsed
|
||||
? Icons.expand_less
|
||||
: Icons.expand_more,
|
||||
),
|
||||
color: MeshPalette.ink,
|
||||
tooltip: collapsed
|
||||
? l10n.pathMap_expandPanel
|
||||
: l10n.pathMap_collapsePanel,
|
||||
onPressed: onToggleCollapsed,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
collapsed
|
||||
? Icons.expand_less
|
||||
: Icons.expand_more,
|
||||
),
|
||||
color: MeshPalette.ink,
|
||||
tooltip: collapsed
|
||||
? l10n.pathMap_expandPanel
|
||||
: l10n.pathMap_collapsePanel,
|
||||
onPressed: onToggleCollapsed,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
PathAnimationControls(
|
||||
playback: playback,
|
||||
selected: selected,
|
||||
animationEnabled: animationEnabled,
|
||||
onToggleAnimation: onToggleAnimation,
|
||||
followEnabled: followEnabled,
|
||||
onToggleFollow: onToggleFollow,
|
||||
),
|
||||
// The map is covered while expanded, so
|
||||
// the animation controls are pointless.
|
||||
if (!isExpanded)
|
||||
PathAnimationControls(
|
||||
playback: playback,
|
||||
selected: selected,
|
||||
animationEnabled: animationEnabled,
|
||||
onToggleAnimation: onToggleAnimation,
|
||||
followEnabled: followEnabled,
|
||||
onToggleFollow: onToggleFollow,
|
||||
),
|
||||
if (!collapsed) ...[
|
||||
if (showNoSelfGpsNote)
|
||||
Padding(
|
||||
@@ -503,4 +541,23 @@ class PathMapBottomPanel extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Swipe up on the header grows the panel (collapsed -> normal ->
|
||||
/// expanded); swipe down shrinks it the other way.
|
||||
void _handleHeaderDrag(double velocity, bool isExpanded) {
|
||||
const minVelocity = 150.0;
|
||||
if (velocity < -minVelocity) {
|
||||
if (collapsed) {
|
||||
onToggleCollapsed();
|
||||
} else if (!isExpanded) {
|
||||
onToggleExpanded?.call();
|
||||
}
|
||||
} else if (velocity > minVelocity) {
|
||||
if (isExpanded) {
|
||||
onToggleExpanded?.call();
|
||||
} else if (!collapsed) {
|
||||
onToggleCollapsed();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import '../screens/path_trace_map.dart';
|
||||
import '../services/path_history_service.dart';
|
||||
import 'path_editor_sheet.dart';
|
||||
|
||||
enum _RoutingMode { auto, flood, manual }
|
||||
enum _RoutingMode { auto, flood, direct, manual }
|
||||
|
||||
enum _PathQuality { strong, good, fair, proven, flood, untested }
|
||||
|
||||
@@ -72,7 +72,8 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
_RoutingMode _modeOf(Contact contact) {
|
||||
final override = contact.pathOverride;
|
||||
if (override == null) return _RoutingMode.auto;
|
||||
return override < 0 ? _RoutingMode.flood : _RoutingMode.manual;
|
||||
if (override < 0) return _RoutingMode.flood;
|
||||
return override == 0 ? _RoutingMode.direct : _RoutingMode.manual;
|
||||
}
|
||||
|
||||
Future<void> _selectMode(
|
||||
@@ -87,6 +88,13 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
case _RoutingMode.flood:
|
||||
setState(() => _syncStatus = null);
|
||||
await connector.setPathOverride(contact, pathLen: -1);
|
||||
case _RoutingMode.direct:
|
||||
setState(() => _syncStatus = null);
|
||||
await connector.setPathOverride(
|
||||
contact,
|
||||
pathLen: 0,
|
||||
pathBytes: Uint8List(0),
|
||||
);
|
||||
case _RoutingMode.manual:
|
||||
await _editManualPath(connector, contact);
|
||||
}
|
||||
@@ -224,6 +232,7 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
return switch (mode) {
|
||||
_RoutingMode.auto => l10n.routing_modeAutoHint,
|
||||
_RoutingMode.flood => l10n.routing_modeFloodHint,
|
||||
_RoutingMode.direct => l10n.routing_modeDirectHint,
|
||||
_RoutingMode.manual => l10n.routing_modeManualHint,
|
||||
};
|
||||
}
|
||||
@@ -238,6 +247,8 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
switch (mode) {
|
||||
case _RoutingMode.flood:
|
||||
return l10n.routing_floodBroadcast;
|
||||
case _RoutingMode.direct:
|
||||
return l10n.routing_directNoHops;
|
||||
case _RoutingMode.manual:
|
||||
final bytes = contact.pathOverrideBytes ?? Uint8List(0);
|
||||
if (bytes.isEmpty) return l10n.routing_directNoHops;
|
||||
@@ -262,7 +273,7 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
|
||||
Uint8List _displayBytes(Contact contact, _RoutingMode mode) {
|
||||
return switch (mode) {
|
||||
_RoutingMode.flood => Uint8List(0),
|
||||
_RoutingMode.flood || _RoutingMode.direct => Uint8List(0),
|
||||
_RoutingMode.manual => contact.pathOverrideBytes ?? Uint8List(0),
|
||||
_RoutingMode.auto => contact.path,
|
||||
};
|
||||
@@ -378,9 +389,11 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
color: scheme.primary,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
l10n.routing_currentRoute,
|
||||
style: theme.textTheme.titleSmall,
|
||||
Flexible(
|
||||
child: Text(
|
||||
l10n.routing_currentRoute,
|
||||
style: theme.textTheme.titleSmall,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -543,14 +556,24 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
};
|
||||
|
||||
final hasBytes = record.pathBytes.isNotEmpty;
|
||||
final inUse =
|
||||
hasBytes &&
|
||||
((mode == _RoutingMode.manual &&
|
||||
listEquals(record.pathBytes, contact.pathOverrideBytes)) ||
|
||||
(mode == _RoutingMode.auto &&
|
||||
listEquals(record.pathBytes, contact.path)));
|
||||
// A zero-hop record is the direct path: usable even without hop bytes.
|
||||
final isDirect = !hasBytes && record.hopCount == 0;
|
||||
final usable = hasBytes || isDirect;
|
||||
final inUse = isDirect
|
||||
? mode == _RoutingMode.direct ||
|
||||
(mode == _RoutingMode.auto && contact.pathLength == 0)
|
||||
: hasBytes &&
|
||||
((mode == _RoutingMode.manual &&
|
||||
listEquals(
|
||||
record.pathBytes,
|
||||
contact.pathOverrideBytes,
|
||||
)) ||
|
||||
(mode == _RoutingMode.auto &&
|
||||
listEquals(record.pathBytes, contact.path)));
|
||||
|
||||
final title = hasBytes
|
||||
final title = isDirect
|
||||
? l10n.routing_directNoHops
|
||||
: hasBytes
|
||||
? PathHelper.resolvePathNames(
|
||||
record.pathBytes,
|
||||
connector.allContacts,
|
||||
@@ -583,7 +606,7 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
child: Card(
|
||||
margin: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: ListTile(
|
||||
enabled: hasBytes,
|
||||
enabled: usable,
|
||||
leading: CircleAvatar(
|
||||
radius: 18,
|
||||
backgroundColor: bg,
|
||||
@@ -623,7 +646,7 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: hasBytes && !inUse
|
||||
onTap: usable && !inUse
|
||||
? () => _applyHistoryPath(connector, contact, record)
|
||||
: null,
|
||||
onLongPress: hasBytes
|
||||
@@ -698,30 +721,58 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SegmentedButton<_RoutingMode>(
|
||||
style: const ButtonStyle(
|
||||
minimumSize: WidgetStatePropertyAll(Size.fromHeight(44)),
|
||||
),
|
||||
segments: [
|
||||
ButtonSegment(
|
||||
value: _RoutingMode.auto,
|
||||
icon: const Icon(Icons.auto_mode),
|
||||
label: Text(l10n.routing_modeAuto),
|
||||
),
|
||||
ButtonSegment(
|
||||
value: _RoutingMode.flood,
|
||||
icon: const Icon(Icons.waves),
|
||||
label: Text(l10n.routing_modeFlood),
|
||||
),
|
||||
ButtonSegment(
|
||||
value: _RoutingMode.manual,
|
||||
icon: const Icon(Icons.edit_road),
|
||||
label: Text(l10n.routing_modeManual),
|
||||
),
|
||||
],
|
||||
selected: {mode},
|
||||
onSelectionChanged: (selection) =>
|
||||
_selectMode(connector, contact, selection.first),
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
// Four modes share one row: on phones drop the icons and let
|
||||
// labels shrink rather than clip, so every word stays whole.
|
||||
final showIcons = constraints.maxWidth >= 480;
|
||||
ButtonSegment<_RoutingMode> segment(
|
||||
_RoutingMode value,
|
||||
IconData icon,
|
||||
String label,
|
||||
) => ButtonSegment(
|
||||
value: value,
|
||||
icon: showIcons ? Icon(icon) : null,
|
||||
label: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(label, maxLines: 1, softWrap: false),
|
||||
),
|
||||
);
|
||||
return SegmentedButton<_RoutingMode>(
|
||||
showSelectedIcon: false,
|
||||
style: const ButtonStyle(
|
||||
minimumSize: WidgetStatePropertyAll(Size.fromHeight(48)),
|
||||
padding: WidgetStatePropertyAll(
|
||||
EdgeInsets.symmetric(horizontal: 6),
|
||||
),
|
||||
),
|
||||
segments: [
|
||||
segment(
|
||||
_RoutingMode.auto,
|
||||
Icons.auto_mode,
|
||||
l10n.routing_modeAuto,
|
||||
),
|
||||
segment(
|
||||
_RoutingMode.flood,
|
||||
Icons.waves,
|
||||
l10n.routing_modeFlood,
|
||||
),
|
||||
segment(
|
||||
_RoutingMode.direct,
|
||||
Icons.near_me,
|
||||
l10n.routing_modeDirect,
|
||||
),
|
||||
segment(
|
||||
_RoutingMode.manual,
|
||||
Icons.edit_road,
|
||||
l10n.routing_modeManual,
|
||||
),
|
||||
],
|
||||
selected: {mode},
|
||||
onSelectionChanged: (selection) =>
|
||||
_selectMode(connector, contact, selection.first),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
|
||||
@@ -82,7 +82,34 @@ class _SharedContactCardState extends State<SharedContactCard> {
|
||||
if (isSelf) {
|
||||
action = _status(Icons.person_outline, l10n.contactShare_isYou);
|
||||
} else if (isSaved) {
|
||||
action = _status(Icons.check_circle_outline, l10n.contactShare_saved);
|
||||
// Still offer a re-add: the app's list can lag the radio (e.g. the
|
||||
// contact was dropped on the radio or by another client), and adding
|
||||
// again just refreshes an existing entry.
|
||||
action = Wrap(
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
spacing: 8,
|
||||
children: [
|
||||
_status(Icons.check_circle_outline, l10n.contactShare_saved),
|
||||
TextButton(
|
||||
onPressed: connector.isConnected && !_adding
|
||||
? () => _add(connector)
|
||||
: null,
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: widget.textColor,
|
||||
minimumSize: const Size(48, 48),
|
||||
),
|
||||
child: Text(
|
||||
_adding ? l10n.contactShare_adding : l10n.contactShare_addAgain,
|
||||
style: TextStyle(
|
||||
fontSize: 14 * scale,
|
||||
fontWeight: FontWeight.w600,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: widget.textColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
action = SizedBox(
|
||||
width: double.infinity,
|
||||
|
||||
@@ -225,6 +225,28 @@ void main() {
|
||||
expect(_storedTexts(hikingId), isNot(contains(_queuedHikingText)));
|
||||
});
|
||||
|
||||
test(
|
||||
'bulk delete matches by id, not the object held by the selection',
|
||||
() async {
|
||||
await _connect(_TestRadio());
|
||||
await _waitFor(() => _texts(1).contains(_queuedHikingText));
|
||||
final stored = _connector
|
||||
.getChannelMessages(_channelAt(1))
|
||||
.firstWhere((m) => m.text == _queuedHikingText);
|
||||
// A repeat heard while the confirmation was open replaces the stored
|
||||
// object; the selection still holds the old one with the same id.
|
||||
final stale = stored.copyWith();
|
||||
expect(identical(stale, stored), isFalse);
|
||||
expect(stale.messageId, stored.messageId);
|
||||
|
||||
final removed = await _connector.deleteChannelMessages([stale]);
|
||||
await _connector.flushPendingWrites();
|
||||
expect(removed, 1);
|
||||
expect(_texts(1), isNot(contains(_queuedHikingText)));
|
||||
expect(_storedTexts(hikingId), isNot(contains(_queuedHikingText)));
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'a PSK edit in place keeps the channel\'s place in the custom order',
|
||||
() async {
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_open/helpers/chat_jump.dart';
|
||||
|
||||
/// A reversed chat-style list with uneven row heights, so the list's extent
|
||||
/// estimate is wrong and the helper has to walk to the target.
|
||||
Widget _list(ScrollController controller, int count) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
body: ListView.builder(
|
||||
reverse: true,
|
||||
controller: controller,
|
||||
itemCount: count,
|
||||
itemBuilder: (context, index) => SizedBox(
|
||||
key: ValueKey('row$index'),
|
||||
height: 40.0 + (index % 7) * 30,
|
||||
child: Text('row $index'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void main() {
|
||||
for (final target in [0, 7, 250, 499]) {
|
||||
testWidgets('brings row $target of 500 on screen', (tester) async {
|
||||
final controller = ScrollController();
|
||||
addTearDown(controller.dispose);
|
||||
await tester.pumpWidget(_list(controller, 500));
|
||||
|
||||
late bool found;
|
||||
final done = scrollListToIndex(
|
||||
controller: controller,
|
||||
targetIndex: target,
|
||||
itemCount: 500,
|
||||
isMounted: () => true,
|
||||
).then((value) => found = value);
|
||||
// Drive frames until the helper finishes.
|
||||
for (var i = 0; i < 200; i++) {
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
}
|
||||
await done;
|
||||
|
||||
expect(found, isTrue);
|
||||
final row = find.byKey(ValueKey('row$target'));
|
||||
expect(row, findsOneWidget);
|
||||
final rect = tester.getRect(row);
|
||||
final screen = tester.getRect(find.byType(ListView));
|
||||
expect(screen.overlaps(rect), isTrue);
|
||||
});
|
||||
}
|
||||
|
||||
// Codex's case: older rows much taller than recent ones, so the first
|
||||
// estimate lands hundreds of rows short.
|
||||
testWidgets('reaches a row far past rows of a very different height', (
|
||||
tester,
|
||||
) async {
|
||||
final controller = ScrollController();
|
||||
addTearDown(controller.dispose);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: ListView.builder(
|
||||
reverse: true,
|
||||
controller: controller,
|
||||
itemCount: 2000,
|
||||
itemBuilder: (_, i) => SizedBox(
|
||||
key: ValueKey('row$i'),
|
||||
height: i < 1000 ? 60 : 300,
|
||||
child: Text('row $i'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
bool? found;
|
||||
final done = scrollListToIndex(
|
||||
controller: controller,
|
||||
targetIndex: 1500,
|
||||
itemCount: 2000,
|
||||
isMounted: () => true,
|
||||
).then((v) => found = v);
|
||||
for (var i = 0; i < 300; i++) {
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
}
|
||||
await done;
|
||||
expect(found, isTrue);
|
||||
expect(find.byKey(const ValueKey('row1500')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('rejects an index outside the list', (tester) async {
|
||||
final controller = ScrollController();
|
||||
addTearDown(controller.dispose);
|
||||
await tester.pumpWidget(_list(controller, 10));
|
||||
expect(
|
||||
await scrollListToIndex(
|
||||
controller: controller,
|
||||
targetIndex: 10,
|
||||
itemCount: 10,
|
||||
isMounted: () => true,
|
||||
),
|
||||
isFalse,
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -65,4 +65,14 @@ void main() {
|
||||
expect(parseContactShare('<$_hex:1:CC> hi'), isNull);
|
||||
expect(parseContactShare('hello'), isNull);
|
||||
});
|
||||
|
||||
test('findContactShare locates a token inside copied text', () {
|
||||
final s = findContactShare('Alice: <$_hex:2:Hilltop Rpt>')!;
|
||||
expect(s.publicKeyHex, _hex);
|
||||
expect(s.type, 2);
|
||||
expect(s.name, 'Hilltop Rpt');
|
||||
expect(findContactShare('look <$_hex:1:CC> here')!.name, 'CC');
|
||||
expect(findContactShare('meshcore://abcdef'), isNull);
|
||||
expect(findContactShare('<$_hex:9:x>'), isNull);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,263 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:provider/single_child_widget.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:meshcore_open/connector/meshcore_connector.dart';
|
||||
import 'package:meshcore_open/connector/meshcore_protocol.dart';
|
||||
import 'package:meshcore_open/l10n/app_localizations.dart';
|
||||
import 'package:meshcore_open/review_mode/review_radio.dart';
|
||||
import 'package:meshcore_open/screens/channel_chat_screen.dart';
|
||||
import 'package:meshcore_open/screens/chat_screen.dart';
|
||||
import 'package:meshcore_open/services/app_debug_log_service.dart';
|
||||
import 'package:meshcore_open/services/app_settings_service.dart';
|
||||
import 'package:meshcore_open/services/ble_debug_log_service.dart';
|
||||
import 'package:meshcore_open/services/chat_text_scale_service.dart';
|
||||
import 'package:meshcore_open/services/image_codec_service.dart';
|
||||
import 'package:meshcore_open/services/map_tile_cache_service.dart';
|
||||
import 'package:meshcore_open/services/message_retry_service.dart';
|
||||
import 'package:meshcore_open/services/path_history_service.dart';
|
||||
import 'package:meshcore_open/services/received_image_store.dart';
|
||||
import 'package:meshcore_open/services/storage_service.dart';
|
||||
import 'package:meshcore_open/services/timeout_prediction_service.dart';
|
||||
import 'package:meshcore_open/services/translation_service.dart';
|
||||
import 'package:meshcore_open/services/ui_view_state_service.dart';
|
||||
import 'package:meshcore_open/storage/prefs_manager.dart';
|
||||
import 'package:meshcore_open/theme/mesh_theme.dart';
|
||||
|
||||
/// Chat screen behaviour that depends on navigation: which conversation is
|
||||
/// active while chats are covered, and jumping to a search result.
|
||||
void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
final tempDir = Directory.systemTemp.createTempSync('active_conv_test');
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(
|
||||
const MethodChannel('plugins.flutter.io/path_provider'),
|
||||
(call) async => tempDir.path,
|
||||
);
|
||||
|
||||
setUpAll(() async {
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
PrefsManager.reset();
|
||||
await PrefsManager.initialize();
|
||||
});
|
||||
|
||||
// A chat covered by another page (e.g. one opened from a notification) must
|
||||
// stop being the active conversation, and become active again once the page
|
||||
// on top is popped, so unread counting matches what is on screen.
|
||||
testWidgets('covered chats unregister and re-register when uncovered', (
|
||||
tester,
|
||||
) async {
|
||||
final (connector, navigatorKey) = await _pumpChannelChat(tester);
|
||||
final channelA = connector.channels[0];
|
||||
final channelB = connector.channels[1];
|
||||
final contact = connector.contacts.firstWhere((c) => c.type == advTypeChat);
|
||||
|
||||
expect(connector.activeChannelIndex, channelA.index);
|
||||
|
||||
// Channel B opened on top (as a notification tap does).
|
||||
navigatorKey.currentState!.push(
|
||||
MaterialPageRoute(builder: (_) => ChannelChatScreen(channel: channelB)),
|
||||
);
|
||||
await _settle(tester);
|
||||
expect(connector.activeChannelIndex, channelB.index);
|
||||
|
||||
navigatorKey.currentState!.pop();
|
||||
await _settle(tester);
|
||||
expect(connector.activeChannelIndex, channelA.index);
|
||||
|
||||
// A DM on top hides the channel entirely.
|
||||
navigatorKey.currentState!.push(
|
||||
MaterialPageRoute(builder: (_) => ChatScreen(contact: contact)),
|
||||
);
|
||||
await _settle(tester);
|
||||
expect(connector.activeChannelIndex, isNull);
|
||||
expect(connector.activeContactKey, contact.publicKeyHex);
|
||||
|
||||
navigatorKey.currentState!.pop();
|
||||
await _settle(tester);
|
||||
expect(connector.activeContactKey, isNull);
|
||||
expect(connector.activeChannelIndex, channelA.index);
|
||||
|
||||
// A page pushed without a transition never reports `forward`.
|
||||
navigatorKey.currentState!.push(
|
||||
_InstantPageRoute(builder: (_) => const Scaffold()),
|
||||
);
|
||||
await _settle(tester);
|
||||
expect(connector.activeChannelIndex, isNull);
|
||||
|
||||
navigatorKey.currentState!.pop();
|
||||
await _settle(tester);
|
||||
expect(connector.activeChannelIndex, channelA.index);
|
||||
|
||||
await _tearDown(tester);
|
||||
expect(connector.activeChannelIndex, isNull);
|
||||
});
|
||||
|
||||
testWidgets('tapping a search result closes search and shows the message', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(400, 700);
|
||||
tester.view.devicePixelRatio = 1.0;
|
||||
addTearDown(tester.view.reset);
|
||||
|
||||
final (connector, _) = await _pumpChannelChat(tester);
|
||||
final messages = connector.getChannelMessages(connector.channels[0]);
|
||||
expect(messages, isNotEmpty);
|
||||
// The oldest message: furthest from where the chat opens (the bottom).
|
||||
final target = messages.first;
|
||||
final word = target.text
|
||||
.split(RegExp(r'\s+'))
|
||||
.firstWhere((w) => w.length >= 4, orElse: () => target.text);
|
||||
|
||||
await tester.tap(find.byTooltip('Search messages'));
|
||||
await _settle(tester);
|
||||
await tester.enterText(
|
||||
find.descendant(
|
||||
of: find.byType(AppBar),
|
||||
matching: find.byType(TextField),
|
||||
),
|
||||
word,
|
||||
);
|
||||
await _settle(tester);
|
||||
|
||||
// Results show sender + time headers; tap the row holding the target.
|
||||
final result = find.descendant(
|
||||
of: find.byType(ListView),
|
||||
matching: find.textContaining(target.text, findRichText: true),
|
||||
);
|
||||
expect(result, findsWidgets);
|
||||
await tester.tap(result.first);
|
||||
for (var i = 0; i < 40; i++) {
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
}
|
||||
|
||||
// Search is closed and the message bubble is on screen.
|
||||
expect(find.byTooltip('Close search'), findsNothing);
|
||||
final bubble = find.textContaining(target.text, findRichText: true);
|
||||
expect(bubble, findsWidgets);
|
||||
final screen = Offset.zero & const Size(400, 700);
|
||||
expect(
|
||||
bubble.evaluate().any((e) {
|
||||
final box = e.renderObject as RenderBox?;
|
||||
if (box == null || !box.hasSize) return false;
|
||||
return screen.overlaps(box.localToGlobal(Offset.zero) & box.size);
|
||||
}),
|
||||
isTrue,
|
||||
);
|
||||
|
||||
await _tearDown(tester);
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _settle(WidgetTester tester) async {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _tearDown(WidgetTester tester) async {
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
await tester.pump(const Duration(minutes: 1));
|
||||
}
|
||||
|
||||
/// One review-radio connection shared by the tests: reconnecting it in the
|
||||
/// same run does not resend the channel list.
|
||||
(MeshCoreConnector, List<SingleChildWidget>)? _shared;
|
||||
|
||||
/// Connects the review radio (once) and shows the first channel's chat.
|
||||
Future<(MeshCoreConnector, GlobalKey<NavigatorState>)> _pumpChannelChat(
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
final (connector, providers) = _shared ??= await _connect(tester);
|
||||
final navigatorKey = GlobalKey<NavigatorState>();
|
||||
await tester.pumpWidget(
|
||||
MultiProvider(
|
||||
providers: providers,
|
||||
child: MaterialApp(
|
||||
navigatorKey: navigatorKey,
|
||||
theme: MeshTheme.light(),
|
||||
locale: const Locale('en'),
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
home: ChannelChatScreen(channel: connector.channels[0]),
|
||||
),
|
||||
),
|
||||
);
|
||||
await _settle(tester);
|
||||
return (connector, navigatorKey);
|
||||
}
|
||||
|
||||
Future<(MeshCoreConnector, List<SingleChildWidget>)> _connect(
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
final storage = StorageService();
|
||||
final connector = MeshCoreConnector();
|
||||
final retry = MessageRetryService();
|
||||
final settings = AppSettingsService();
|
||||
final translation = TranslationService(settings);
|
||||
await tester.runAsync(() async {
|
||||
await settings.loadSettings();
|
||||
connector.initialize(
|
||||
retryService: retry,
|
||||
pathHistoryService: PathHistoryService(storage),
|
||||
appSettingsService: settings,
|
||||
translationService: translation,
|
||||
);
|
||||
connector.reviewRadioFactoryForTest = () => ReviewRadio(
|
||||
scheduledMessageInterval: const Duration(hours: 1),
|
||||
ackDelay: const Duration(hours: 1),
|
||||
replyDelay: const Duration(hours: 1),
|
||||
);
|
||||
await connector.connectReview();
|
||||
final end = DateTime.now().add(const Duration(seconds: 8));
|
||||
while ((connector.contacts.isEmpty || connector.channels.length < 2) &&
|
||||
DateTime.now().isBefore(end)) {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 25));
|
||||
}
|
||||
});
|
||||
expect(connector.channels.length, greaterThanOrEqualTo(2));
|
||||
|
||||
return (
|
||||
connector,
|
||||
<SingleChildWidget>[
|
||||
ChangeNotifierProvider.value(value: connector),
|
||||
ChangeNotifierProvider.value(value: retry),
|
||||
ChangeNotifierProvider.value(value: PathHistoryService(storage)),
|
||||
ChangeNotifierProvider.value(value: settings),
|
||||
ChangeNotifierProvider.value(value: BleDebugLogService()),
|
||||
ChangeNotifierProvider.value(value: AppDebugLogService()),
|
||||
ChangeNotifierProvider.value(value: ChatTextScaleService()),
|
||||
ChangeNotifierProvider.value(value: translation),
|
||||
ChangeNotifierProvider.value(value: UiViewStateService()),
|
||||
Provider.value(value: storage),
|
||||
ChangeNotifierProvider.value(
|
||||
value: MapTileCacheService(appSettingsService: settings),
|
||||
),
|
||||
ChangeNotifierProvider.value(value: TimeoutPredictionService(storage)),
|
||||
ChangeNotifierProvider.value(value: ImageCodecService(settings)),
|
||||
ChangeNotifierProvider.value(value: ReceivedImageStore()),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
class _InstantPageRoute extends MaterialPageRoute<void> {
|
||||
_InstantPageRoute({required super.builder});
|
||||
|
||||
@override
|
||||
Duration get transitionDuration => Duration.zero;
|
||||
|
||||
@override
|
||||
Duration get reverseTransitionDuration => Duration.zero;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -56,6 +57,7 @@ import 'package:meshcore_open/services/translation_service.dart';
|
||||
import 'package:meshcore_open/services/ui_view_state_service.dart';
|
||||
import 'package:meshcore_open/storage/prefs_manager.dart';
|
||||
import 'package:meshcore_open/theme/mesh_theme.dart';
|
||||
import 'package:meshcore_open/widgets/routing_sheet.dart';
|
||||
|
||||
/// Renders every screen on a small phone (320x568, the narrowest common
|
||||
/// width) at several text scales, plus a desktop window, and fails on any
|
||||
@@ -146,11 +148,21 @@ _interactions = {
|
||||
'Contacts add sheet': (t, _) async {
|
||||
await t.tap(find.byType(FloatingActionButton));
|
||||
},
|
||||
// Four routing modes (Auto, Flood, Direct, Manual) share one row.
|
||||
'Routing sheet': (t, c) async {
|
||||
unawaited(
|
||||
ContactRoutingSheet.show(
|
||||
t.element(find.byType(ChatScreen)),
|
||||
contact: _contactOfType(c, advTypeChat),
|
||||
),
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
final Map<String, _ScreenBuilder> _screens = {
|
||||
'Contacts options sheet': (_) => const ContactsScreen(),
|
||||
'Contacts add sheet': (_) => const ContactsScreen(),
|
||||
'Routing sheet': (c) => ChatScreen(contact: _contactOfType(c, advTypeChat)),
|
||||
'Scanner': (_) => const ScannerScreen(),
|
||||
'Tcp': (_) => const TcpScreen(),
|
||||
'Usb': (_) => const UsbScreen(),
|
||||
|
||||
@@ -323,6 +323,26 @@ void main() {
|
||||
expect(service.notSpamExampleCount, 1);
|
||||
});
|
||||
|
||||
test('bulk spam and not-spam store every example and persist', () async {
|
||||
await service.markSpamMany([
|
||||
(sender: 'a', text: 'Buy now'),
|
||||
(sender: 'b', text: 'Free crypto'),
|
||||
(sender: 'c', text: ' '),
|
||||
]);
|
||||
expect(service.spamExampleCount, 2);
|
||||
|
||||
await service.markNotSpamMany([
|
||||
(channelId: _channel, sender: 'a', text: 'buy now'),
|
||||
(channelId: _channel, sender: 'd', text: 'Hello all'),
|
||||
]);
|
||||
expect(service.spamExampleCount, 1);
|
||||
expect(service.notSpamExampleCount, 2);
|
||||
|
||||
final reloaded = await create();
|
||||
expect(reloaded.spamExampleCount, 1);
|
||||
expect(reloaded.notSpamExampleCount, 2);
|
||||
});
|
||||
|
||||
test('state persists across instances and reset keeps rules', () async {
|
||||
await service.addRule(const FilterRule(id: 'r1', pattern: 'promo'));
|
||||
await service.updateSettings(
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_open/models/contact.dart';
|
||||
import 'package:meshcore_open/models/message.dart';
|
||||
import 'package:meshcore_open/models/path_selection.dart';
|
||||
import 'package:meshcore_open/services/message_retry_service.dart';
|
||||
|
||||
Contact _contact({int pathLength = -1, List<int> path = const []}) => Contact(
|
||||
publicKey: Uint8List.fromList(List<int>.generate(32, (i) => 0xAA + i)),
|
||||
name: 'Test',
|
||||
type: 1,
|
||||
pathLength: pathLength,
|
||||
path: Uint8List.fromList(path),
|
||||
lastSeen: DateTime.now(),
|
||||
);
|
||||
|
||||
/// Route failures only count once the contact proved reachable: a message
|
||||
/// that never gets through must not wreck the routes' history.
|
||||
void main() {
|
||||
late MessageRetryService service;
|
||||
late Map<String, Message> latest;
|
||||
late List<({int attempt, int timestamp})> sends;
|
||||
late List<({List<int> path, bool flood, bool success})> results;
|
||||
final selfKey = Uint8List(32);
|
||||
|
||||
setUp(() {
|
||||
service = MessageRetryService(
|
||||
sentWatchdogGrace: const Duration(milliseconds: 10),
|
||||
);
|
||||
service.setMaxRetries(2);
|
||||
latest = {};
|
||||
sends = [];
|
||||
results = [];
|
||||
service.initialize(
|
||||
RetryServiceConfig(
|
||||
sendMessage: (_, _, attempt, timestamp) async {
|
||||
sends.add((attempt: attempt, timestamp: timestamp));
|
||||
},
|
||||
addMessage: (_, m) => latest[m.messageId] = m,
|
||||
updateMessage: (m) => latest[m.messageId] = m,
|
||||
getSelfPublicKey: () => selfKey,
|
||||
calculateTimeout: (_, _, {String? contactKey, int? deviceTimeoutMs}) =>
|
||||
20,
|
||||
recordPathResult: (_, PathSelection selection, success, _) =>
|
||||
results.add((
|
||||
path: List<int>.of(selection.pathBytes),
|
||||
flood: selection.useFlood,
|
||||
success: success,
|
||||
)),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
tearDown(() => service.dispose());
|
||||
|
||||
// Lists inside records compare by identity, so compare readable strings.
|
||||
List<String> recorded() => [
|
||||
for (final r in results)
|
||||
'${r.flood ? 'flood' : r.path}:${r.success ? 'ok' : 'fail'}',
|
||||
];
|
||||
|
||||
int ackHashFor(int attempt) => MessageRetryService.computeExpectedAckHash(
|
||||
sends.firstWhere((s) => s.attempt == attempt).timestamp,
|
||||
attempt,
|
||||
'hello',
|
||||
selfKey,
|
||||
);
|
||||
|
||||
test('a message that never gets through blames no route', () async {
|
||||
await service.sendMessageWithRetry(
|
||||
contact: _contact(pathLength: 2, path: [0x11, 0x22]),
|
||||
text: 'hello',
|
||||
);
|
||||
await pumpEventQueue();
|
||||
|
||||
// Attempt 0 times out, the 1 s backoff runs, attempt 1 times out too.
|
||||
await Future<void>.delayed(const Duration(milliseconds: 1300));
|
||||
|
||||
expect(latest.values.single.status, MessageStatus.failed);
|
||||
expect(results.where((r) => !r.flood), isEmpty);
|
||||
});
|
||||
|
||||
test('once delivered, the routes that timed out are blamed', () async {
|
||||
await service.sendMessageWithRetry(
|
||||
contact: _contact(pathLength: 2, path: [0x11, 0x22]),
|
||||
text: 'hello',
|
||||
);
|
||||
await pumpEventQueue();
|
||||
|
||||
// Attempt 0 times out; the retry goes out on another route.
|
||||
await Future<void>.delayed(const Duration(milliseconds: 100));
|
||||
service.updatePendingContact(_contact(pathLength: 1, path: [0x33]));
|
||||
// Act as soon as attempt 1 goes out, before its own 30 ms watchdog.
|
||||
for (var i = 0; i < 300 && sends.length < 2; i++) {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 5));
|
||||
}
|
||||
expect(sends.map((s) => s.attempt), [0, 1]);
|
||||
|
||||
// The radio confirms the send (so the ACK maps to attempt 1), then ACKs.
|
||||
expect(service.updateMessageFromSent(ackHashFor(1), 60000), isTrue);
|
||||
service.handleAckReceived(ackHashFor(1), 400);
|
||||
|
||||
expect(latest.values.single.status, MessageStatus.delivered);
|
||||
expect(recorded(), ['[17, 34]:fail', '[51]:ok']);
|
||||
});
|
||||
|
||||
test(
|
||||
'a late ACK for a timed-out attempt credits it, not blames it',
|
||||
() async {
|
||||
await service.sendMessageWithRetry(
|
||||
contact: _contact(pathLength: 2, path: [0x11, 0x22]),
|
||||
text: 'hello',
|
||||
);
|
||||
await pumpEventQueue();
|
||||
|
||||
// Attempt 0 times out and its failure is held back...
|
||||
await Future<void>.delayed(const Duration(milliseconds: 100));
|
||||
expect(latest.values.single.retryCount, 1);
|
||||
|
||||
// ...then its ACK arrives after all.
|
||||
service.handleAckReceived(ackHashFor(0), 900);
|
||||
|
||||
expect(recorded(), ['[17, 34]:ok']);
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'a late ACK after the final timeout still blames earlier routes',
|
||||
() async {
|
||||
await service.sendMessageWithRetry(
|
||||
contact: _contact(pathLength: 2, path: [0x11, 0x22]),
|
||||
text: 'hello',
|
||||
);
|
||||
await pumpEventQueue();
|
||||
|
||||
// Attempt 0 times out; attempt 1 goes out on another route and also
|
||||
// times out, so the message is marked failed.
|
||||
await Future<void>.delayed(const Duration(milliseconds: 100));
|
||||
service.updatePendingContact(_contact(pathLength: 1, path: [0x33]));
|
||||
for (var i = 0; i < 300 && sends.length < 2; i++) {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 5));
|
||||
}
|
||||
expect(service.updateMessageFromSent(ackHashFor(1), 20), isTrue);
|
||||
await Future<void>.delayed(const Duration(milliseconds: 100));
|
||||
expect(latest.values.single.status, MessageStatus.failed);
|
||||
expect(recorded(), isEmpty);
|
||||
|
||||
// Within the grace period, attempt 1's ACK arrives after all.
|
||||
service.handleAckReceived(ackHashFor(1), 1500);
|
||||
|
||||
expect(latest.values.single.status, MessageStatus.delivered);
|
||||
expect(recorded(), ['[17, 34]:fail', '[51]:ok']);
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'dart:math' as math;
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
@@ -104,9 +105,33 @@ void main() {
|
||||
|
||||
setUp(() {
|
||||
storage = FakeStorageService();
|
||||
svc = PathHistoryService(storage);
|
||||
// Picks are random by design (Thompson sampling); seed for repeatability.
|
||||
svc = PathHistoryService(storage, random: math.Random(1));
|
||||
});
|
||||
|
||||
/// How often each route is picked over [n] selections, keyed by hex bytes.
|
||||
Map<String, int> tally(
|
||||
String pubKey, {
|
||||
int n = 400,
|
||||
int attemptIndex = 0,
|
||||
List<PathSelection> recent = const [],
|
||||
}) {
|
||||
final counts = <String, int>{};
|
||||
for (var i = 0; i < n; i++) {
|
||||
final pick = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: attemptIndex,
|
||||
maxRetries: 5,
|
||||
recentSelections: recent,
|
||||
);
|
||||
final key = pick.useFlood
|
||||
? 'flood'
|
||||
: pick.pathBytes.map((b) => b.toRadixString(16)).join(',');
|
||||
counts[key] = (counts[key] ?? 0) + 1;
|
||||
}
|
||||
return counts;
|
||||
}
|
||||
|
||||
group('path selection', () {
|
||||
test('empty path history returns flood', () {
|
||||
const pubKey =
|
||||
@@ -149,135 +174,129 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
test(
|
||||
'retries avoid immediately repeating the same path when possible',
|
||||
() async {
|
||||
final pubKey = _hex('rot1');
|
||||
await _seed(svc, pubKey, pathBytes: [0xAA], hopCount: 1, weight: 1.0);
|
||||
test('retries usually move to a different path', () async {
|
||||
final pubKey = _hex('rot1');
|
||||
await _seed(svc, pubKey, pathBytes: [0xAA], hopCount: 1, weight: 1.0);
|
||||
svc.recordPathResult(
|
||||
pubKey,
|
||||
const PathSelection(pathBytes: [0xBB], hopCount: 1, useFlood: false),
|
||||
success: true,
|
||||
successIncrement: 0.0,
|
||||
);
|
||||
await _flush();
|
||||
|
||||
// After [0xBB] missed, the retry should mostly try [0xAA].
|
||||
final counts = tally(
|
||||
pubKey,
|
||||
attemptIndex: 1,
|
||||
recent: const [
|
||||
PathSelection(pathBytes: [0xBB], hopCount: 1, useFlood: false),
|
||||
],
|
||||
);
|
||||
expect(counts['flood'], isNull);
|
||||
expect(counts['aa']!, greaterThan(counts['bb'] ?? 0));
|
||||
});
|
||||
|
||||
test('a third retry favours the path not yet tried', () async {
|
||||
final pubKey = _hex('rot2');
|
||||
await _seed(svc, pubKey, pathBytes: [0xA1], hopCount: 1, weight: 3.0);
|
||||
for (final bytes in const [
|
||||
[0xB2],
|
||||
[0xC3],
|
||||
]) {
|
||||
svc.recordPathResult(
|
||||
pubKey,
|
||||
const PathSelection(pathBytes: [0xBB], hopCount: 1, useFlood: false),
|
||||
PathSelection(pathBytes: bytes, hopCount: 1, useFlood: false),
|
||||
success: true,
|
||||
successIncrement: 0.0,
|
||||
);
|
||||
await _flush();
|
||||
}
|
||||
await _flush();
|
||||
|
||||
final first = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
final second = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 1,
|
||||
maxRetries: 5,
|
||||
recentSelections: [first],
|
||||
);
|
||||
final counts = tally(
|
||||
pubKey,
|
||||
attemptIndex: 2,
|
||||
recent: const [
|
||||
PathSelection(pathBytes: [0xB2], hopCount: 1, useFlood: false),
|
||||
PathSelection(pathBytes: [0xC3], hopCount: 1, useFlood: false),
|
||||
],
|
||||
);
|
||||
// [0xA1] is untested (no results) yet still the most likely pick,
|
||||
// because both others just missed for this message.
|
||||
expect(counts['a1']!, greaterThan(counts['b2'] ?? 0));
|
||||
expect(counts['a1']!, greaterThan(counts['c3'] ?? 0));
|
||||
});
|
||||
|
||||
expect(first.useFlood, isFalse);
|
||||
expect(second.useFlood, isFalse);
|
||||
expect(second.pathBytes, isNot(equals(first.pathBytes)));
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'retries avoid the last two paths when a third option exists',
|
||||
() async {
|
||||
final pubKey = _hex('rot2');
|
||||
await _seed(svc, pubKey, pathBytes: [0xA1], hopCount: 1, weight: 3.0);
|
||||
test('first attempts favour the best path but still try others', () async {
|
||||
final pubKey = _hex('rot3');
|
||||
await _seed(svc, pubKey, pathBytes: [0xA1], hopCount: 1, weight: 4.0);
|
||||
for (var i = 0; i < 6; i++) {
|
||||
svc.recordPathResult(
|
||||
pubKey,
|
||||
const PathSelection(pathBytes: [0xB2], hopCount: 1, useFlood: false),
|
||||
success: true,
|
||||
successIncrement: 1.0,
|
||||
);
|
||||
svc.recordPathResult(
|
||||
pubKey,
|
||||
const PathSelection(pathBytes: [0xC3], hopCount: 1, useFlood: false),
|
||||
success: true,
|
||||
successIncrement: 0.0,
|
||||
);
|
||||
await _flush();
|
||||
|
||||
final first = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
final second = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 1,
|
||||
maxRetries: 5,
|
||||
recentSelections: [first],
|
||||
);
|
||||
final third = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 2,
|
||||
maxRetries: 5,
|
||||
recentSelections: [first, second],
|
||||
);
|
||||
|
||||
final chosenPaths = [
|
||||
first.pathBytes,
|
||||
second.pathBytes,
|
||||
third.pathBytes,
|
||||
];
|
||||
expect(
|
||||
chosenPaths
|
||||
.map((path) => path.map((b) => b.toRadixString(16)).join(','))
|
||||
.toSet()
|
||||
.length,
|
||||
equals(3),
|
||||
);
|
||||
expect(
|
||||
chosenPaths,
|
||||
everyElement(anyOf(equals([0xA1]), equals([0xB2]), equals([0xC3]))),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
test('first-attempt selection rotates across ranked candidates', () async {
|
||||
final pubKey = _hex('rot3');
|
||||
await _seed(svc, pubKey, pathBytes: [0xA1], hopCount: 1, weight: 4.0);
|
||||
svc.recordPathResult(
|
||||
pubKey,
|
||||
const PathSelection(pathBytes: [0xB2], hopCount: 1, useFlood: false),
|
||||
success: true,
|
||||
successIncrement: 1.0,
|
||||
);
|
||||
}
|
||||
svc.recordPathResult(
|
||||
pubKey,
|
||||
const PathSelection(pathBytes: [0xC3], hopCount: 1, useFlood: false),
|
||||
success: true,
|
||||
successIncrement: 0.5,
|
||||
success: false,
|
||||
);
|
||||
await _flush();
|
||||
|
||||
final first = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
final second = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
final third = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
final counts = tally(pubKey);
|
||||
expect(counts['b2']!, greaterThan(counts['a1'] ?? 0));
|
||||
expect(counts['b2']!, greaterThan(counts['c3'] ?? 0));
|
||||
// Exploration: the untested path is still tried now and then.
|
||||
expect(counts['a1'] ?? 0, greaterThan(0));
|
||||
});
|
||||
|
||||
expect(first.pathBytes, isNot(equals(second.pathBytes)));
|
||||
expect(second.pathBytes, isNot(equals(third.pathBytes)));
|
||||
expect(
|
||||
[first.pathBytes, second.pathBytes, third.pathBytes]
|
||||
.map((path) => path.map((b) => b.toRadixString(16)).join(','))
|
||||
.toSet()
|
||||
.length,
|
||||
equals(3),
|
||||
// Issue #643: the direct path (zero hops, no bytes) must be a rotation
|
||||
// candidate alongside saved multi-hop routes.
|
||||
test('direct path is a candidate alongside other routes', () async {
|
||||
final pubKey = _hex('dir1');
|
||||
await _seed(svc, pubKey, pathBytes: const [], hopCount: 0, weight: 2.0);
|
||||
svc.recordPathResult(
|
||||
pubKey,
|
||||
const PathSelection(pathBytes: [0xA1], hopCount: 1, useFlood: false),
|
||||
success: true,
|
||||
);
|
||||
await _flush();
|
||||
|
||||
final counts = tally(pubKey);
|
||||
expect(counts['flood'], isNull);
|
||||
expect(counts[''] ?? 0, greaterThan(0), reason: 'direct must be tried');
|
||||
expect(counts['a1'] ?? 0, greaterThan(0));
|
||||
});
|
||||
|
||||
test('a lone direct path is used instead of flooding', () async {
|
||||
final pubKey = _hex('dir2');
|
||||
await _seed(svc, pubKey, pathBytes: const [], hopCount: 0);
|
||||
final pick = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
expect(pick.useFlood, isFalse);
|
||||
expect(pick.hopCount, 0);
|
||||
});
|
||||
|
||||
test('resolvePathSelection keeps a direct auto selection', () {
|
||||
final contact = _makeContact(
|
||||
publicKeyHex: _hex('dir3'),
|
||||
pathLength: 2,
|
||||
path: const [0x01, 0x02],
|
||||
);
|
||||
final resolved = resolvePathSelection(
|
||||
contact,
|
||||
selection: const PathSelection(
|
||||
pathBytes: [],
|
||||
hopCount: 0,
|
||||
useFlood: false,
|
||||
),
|
||||
);
|
||||
expect(resolved.useFlood, isFalse);
|
||||
expect(resolved.hopCount, 0);
|
||||
expect(resolved.pathBytes, isEmpty);
|
||||
});
|
||||
|
||||
test('final attempt is always flood regardless of known paths', () async {
|
||||
@@ -330,12 +349,8 @@ void main() {
|
||||
);
|
||||
await _flush();
|
||||
|
||||
final first = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
expect(first.pathBytes, equals([0x02]));
|
||||
final counts = tally(pubKey);
|
||||
expect(counts['2']!, greaterThan(counts['1'] ?? 0));
|
||||
});
|
||||
|
||||
test('lower latency wins when reliability is tied', () async {
|
||||
@@ -356,12 +371,8 @@ void main() {
|
||||
);
|
||||
await _flush();
|
||||
|
||||
final first = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
expect(first.pathBytes, equals([0x20]));
|
||||
final counts = tally(pubKey, n: 1000);
|
||||
expect(counts['20']!, greaterThan(counts['10'] ?? 0));
|
||||
});
|
||||
|
||||
test('fresher path wins when reliability and latency are tied', () async {
|
||||
@@ -396,57 +407,47 @@ void main() {
|
||||
svc.getRecentPaths(pubKey);
|
||||
await _flush();
|
||||
|
||||
final first = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
expect(first.pathBytes, equals([0x02]));
|
||||
final counts = tally(pubKey, n: 1000);
|
||||
expect(counts['2']!, greaterThan(counts['1'] ?? 0));
|
||||
});
|
||||
|
||||
test(
|
||||
'higher route weight wins when other factors are effectively tied',
|
||||
() async {
|
||||
final pubKey = _hex('rank4');
|
||||
final sharedTimestamp = DateTime.now().subtract(
|
||||
const Duration(minutes: 30),
|
||||
);
|
||||
storage._store[pubKey] = ContactPathHistory(
|
||||
contactPubKeyHex: pubKey,
|
||||
recentPaths: [
|
||||
PathRecord(
|
||||
hopCount: 1,
|
||||
tripTimeMs: 750,
|
||||
timestamp: sharedTimestamp,
|
||||
wasFloodDiscovery: false,
|
||||
pathBytes: const [0x01],
|
||||
successCount: 1,
|
||||
failureCount: 0,
|
||||
routeWeight: 4.0,
|
||||
),
|
||||
PathRecord(
|
||||
hopCount: 1,
|
||||
tripTimeMs: 750,
|
||||
timestamp: sharedTimestamp,
|
||||
wasFloodDiscovery: false,
|
||||
pathBytes: const [0x02],
|
||||
successCount: 1,
|
||||
failureCount: 0,
|
||||
routeWeight: 1.0,
|
||||
),
|
||||
],
|
||||
);
|
||||
svc.getRecentPaths(pubKey);
|
||||
await _flush();
|
||||
test('route weight alone does not decide between equal routes', () async {
|
||||
final pubKey = _hex('rank4');
|
||||
final sharedTimestamp = DateTime.now().subtract(
|
||||
const Duration(minutes: 30),
|
||||
);
|
||||
storage._store[pubKey] = ContactPathHistory(
|
||||
contactPubKeyHex: pubKey,
|
||||
recentPaths: [
|
||||
PathRecord(
|
||||
hopCount: 1,
|
||||
tripTimeMs: 750,
|
||||
timestamp: sharedTimestamp,
|
||||
wasFloodDiscovery: false,
|
||||
pathBytes: const [0x01],
|
||||
successCount: 1,
|
||||
failureCount: 0,
|
||||
routeWeight: 4.0,
|
||||
),
|
||||
PathRecord(
|
||||
hopCount: 1,
|
||||
tripTimeMs: 750,
|
||||
timestamp: sharedTimestamp,
|
||||
wasFloodDiscovery: false,
|
||||
pathBytes: const [0x02],
|
||||
successCount: 1,
|
||||
failureCount: 0,
|
||||
routeWeight: 1.0,
|
||||
),
|
||||
],
|
||||
);
|
||||
svc.getRecentPaths(pubKey);
|
||||
await _flush();
|
||||
|
||||
final first = svc.selectPathForAttempt(
|
||||
pubKey,
|
||||
attemptIndex: 0,
|
||||
maxRetries: 5,
|
||||
);
|
||||
expect(first.pathBytes, equals([0x01]));
|
||||
},
|
||||
);
|
||||
// Choice follows delivery results; weight only guards deletion.
|
||||
final counts = tally(pubKey, n: 1000);
|
||||
expect(counts['1']!, inInclusiveRange(350, 650));
|
||||
});
|
||||
});
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -545,6 +546,48 @@ void main() {
|
||||
expect(paths.first.routeWeight, closeTo(1.5, 0.001));
|
||||
});
|
||||
|
||||
test('a route that delivered this week survives a run of failures', () {
|
||||
// e.g. a repeater down for a day: the route must still be there when
|
||||
// it comes back. Faded stats keep it out of use meanwhile.
|
||||
var clock = DateTime(2026, 11, 1);
|
||||
final timed = PathHistoryService(
|
||||
FakeStorageService(),
|
||||
random: math.Random(1),
|
||||
clock: () => clock,
|
||||
);
|
||||
final pubKey = _hex('w0a1');
|
||||
const route = PathSelection(
|
||||
pathBytes: [0x01],
|
||||
hopCount: 1,
|
||||
useFlood: false,
|
||||
);
|
||||
return () async {
|
||||
timed.getRecentPaths(pubKey);
|
||||
await _flush();
|
||||
timed.recordPathResult(pubKey, route, success: true);
|
||||
clock = clock.add(const Duration(days: 1));
|
||||
for (var i = 0; i < 6; i++) {
|
||||
timed.recordPathResult(
|
||||
pubKey,
|
||||
route,
|
||||
success: false,
|
||||
failureDecrement: 0.5,
|
||||
);
|
||||
}
|
||||
expect(timed.getRecentPaths(pubKey), hasLength(1));
|
||||
|
||||
// A week without a delivery: the next failure removes it.
|
||||
clock = clock.add(const Duration(days: 8));
|
||||
timed.recordPathResult(
|
||||
pubKey,
|
||||
route,
|
||||
success: false,
|
||||
failureDecrement: 0.5,
|
||||
);
|
||||
expect(timed.getRecentPaths(pubKey), isEmpty);
|
||||
}();
|
||||
});
|
||||
|
||||
test('failure to 0 removes the path', () async {
|
||||
final pubKey = _hex('w004');
|
||||
await _seed(svc, pubKey, pathBytes: [0x01], hopCount: 1, weight: 0.3);
|
||||
@@ -735,6 +778,27 @@ void main() {
|
||||
expect(credited.tripTimeMs, equals(3000));
|
||||
});
|
||||
|
||||
test('a flood answered directly credits the direct path', () async {
|
||||
final pubKey = _hex('fa0d');
|
||||
await _seed(svc, pubKey, pathBytes: [0xAA], hopCount: 1, weight: 1.0);
|
||||
|
||||
svc.recordFloodPathAttribution(
|
||||
contactPubKeyHex: pubKey,
|
||||
pathBytes: const [],
|
||||
hopCount: 0,
|
||||
tripTimeMs: 800,
|
||||
successIncrement: 0.5,
|
||||
maxWeight: 5.0,
|
||||
);
|
||||
await _flush();
|
||||
|
||||
final direct = svc
|
||||
.getRecentPaths(pubKey)
|
||||
.firstWhere((p) => p.pathBytes.isEmpty && p.hopCount == 0);
|
||||
expect(direct.successCount, 1);
|
||||
expect(direct.routeWeight, closeTo(1.5, 0.001));
|
||||
});
|
||||
|
||||
test('creates new path record when path is unknown', () async {
|
||||
final pubKey = _hex('fa02');
|
||||
// Seed with a different path so the cache is warm.
|
||||
@@ -777,24 +841,27 @@ void main() {
|
||||
expect(paths.first.routeWeight, closeTo(5.0, 0.001));
|
||||
});
|
||||
|
||||
test('ignores empty pathBytes', () async {
|
||||
test('ignores empty pathBytes for a multi-hop path', () async {
|
||||
final pubKey = _hex('fa04');
|
||||
await _seed(svc, pubKey, pathBytes: [0x01], hopCount: 1, weight: 1.0);
|
||||
|
||||
final pathsBefore = svc.getRecentPaths(pubKey);
|
||||
final weightBefore = pathsBefore.first.routeWeight;
|
||||
|
||||
// Hops without their bytes can't be replayed; only zero hops (the
|
||||
// direct path) may be recorded without bytes.
|
||||
svc.recordFloodPathAttribution(
|
||||
contactPubKeyHex: pubKey,
|
||||
pathBytes: [],
|
||||
hopCount: 0,
|
||||
hopCount: 2,
|
||||
successIncrement: 0.5,
|
||||
maxWeight: 5.0,
|
||||
);
|
||||
await _flush();
|
||||
|
||||
// Existing path should be untouched.
|
||||
// Existing path should be untouched and nothing new recorded.
|
||||
final pathsAfter = svc.getRecentPaths(pubKey);
|
||||
expect(pathsAfter, hasLength(1));
|
||||
expect(pathsAfter.first.routeWeight, equals(weightBefore));
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_open/models/path_history.dart';
|
||||
import 'package:meshcore_open/models/path_selection.dart';
|
||||
import 'package:meshcore_open/services/path_history_service.dart';
|
||||
import 'package:meshcore_open/services/route_chooser.dart';
|
||||
|
||||
import 'path_history_service_test.dart' show FakeStorageService;
|
||||
|
||||
final _now = DateTime(2026, 11, 8, 12);
|
||||
|
||||
PathRecord _route(
|
||||
List<int> bytes, {
|
||||
double success = 0,
|
||||
double failure = 0,
|
||||
DateTime? statsAt,
|
||||
int tripTimeMs = 0,
|
||||
}) => PathRecord(
|
||||
hopCount: bytes.length,
|
||||
tripTimeMs: tripTimeMs,
|
||||
timestamp: null,
|
||||
wasFloodDiscovery: false,
|
||||
pathBytes: bytes,
|
||||
successCount: success.round(),
|
||||
failureCount: failure.round(),
|
||||
recentSuccess: success,
|
||||
recentFailure: failure,
|
||||
statsAt: statsAt ?? _now,
|
||||
);
|
||||
|
||||
Map<List<int>, int> _tally(
|
||||
List<PathRecord> routes, {
|
||||
int draws = 2000,
|
||||
RouteContext context = RouteContext.unknown,
|
||||
}) {
|
||||
final random = math.Random(42);
|
||||
final counts = {for (final r in routes) r.pathBytes: 0};
|
||||
for (var i = 0; i < draws; i++) {
|
||||
final pick = pickRoute(routes, random: random, now: _now, context: context);
|
||||
counts[pick.pathBytes] = counts[pick.pathBytes]! + 1;
|
||||
}
|
||||
return counts;
|
||||
}
|
||||
|
||||
RouteContext _hearing(Set<int> firstHops, {bool contactDirect = false}) =>
|
||||
RouteContext(
|
||||
hasNeighbourInfo: true,
|
||||
contactHeardDirectly: contactDirect,
|
||||
firstHopHeard: (bytes, width) =>
|
||||
bytes.isNotEmpty && firstHops.contains(bytes.first),
|
||||
);
|
||||
|
||||
void main() {
|
||||
group('fading', () {
|
||||
test('results lose half their weight per half-life', () {
|
||||
expect(routeDecayFactor(_now, _now), 1.0);
|
||||
expect(
|
||||
routeDecayFactor(_now.subtract(routeStatsHalfLife), _now),
|
||||
closeTo(0.5, 1e-9),
|
||||
);
|
||||
expect(
|
||||
routeDecayFactor(_now.subtract(routeStatsHalfLife * 3), _now),
|
||||
closeTo(0.125, 1e-9),
|
||||
);
|
||||
expect(routeDecayFactor(null, _now), 1.0);
|
||||
});
|
||||
|
||||
test('a new result is added on top of the faded old ones', () {
|
||||
final old = _route(
|
||||
[1],
|
||||
success: 4,
|
||||
failure: 2,
|
||||
statsAt: _now.subtract(routeStatsHalfLife),
|
||||
);
|
||||
final next = addRouteResult(old, success: false, now: _now);
|
||||
expect(next.success, closeTo(2, 1e-9));
|
||||
expect(next.failure, closeTo(2, 1e-9));
|
||||
});
|
||||
|
||||
test('a route proven long ago ranks below one working today', () {
|
||||
final stale = _route(
|
||||
[1],
|
||||
success: 20,
|
||||
statsAt: _now.subtract(const Duration(days: 10)),
|
||||
);
|
||||
final fresh = _route([2], success: 3);
|
||||
double score(PathRecord r) =>
|
||||
routeExpectedScore(r, now: _now, fastestTripMs: null);
|
||||
expect(score(fresh), greaterThan(score(stale)));
|
||||
});
|
||||
|
||||
test('history saved before fading existed seeds from capped counts', () {
|
||||
final legacy = PathRecord.fromJson({
|
||||
'hop_count': 1,
|
||||
'trip_time_ms': 0,
|
||||
'timestamp': _now.toIso8601String(),
|
||||
'was_flood': false,
|
||||
'path_bytes': [1],
|
||||
'success_count': 40,
|
||||
'failure_count': 1,
|
||||
});
|
||||
expect(legacy.recentSuccess, 5);
|
||||
expect(legacy.recentFailure, 1);
|
||||
expect(legacy.statsAt, _now);
|
||||
});
|
||||
});
|
||||
|
||||
group('sampling', () {
|
||||
test('Beta samples average a / (a + b)', () {
|
||||
final random = math.Random(7);
|
||||
for (final (a, b) in [(1.0, 1.0), (8.0, 2.0), (0.6, 3.5)]) {
|
||||
var sum = 0.0;
|
||||
const n = 6000;
|
||||
for (var i = 0; i < n; i++) {
|
||||
final x = sampleBeta(random, a, b);
|
||||
expect(x, inInclusiveRange(0, 1));
|
||||
sum += x;
|
||||
}
|
||||
expect(sum / n, closeTo(a / (a + b), 0.02), reason: 'Beta($a, $b)');
|
||||
}
|
||||
});
|
||||
|
||||
test('a proven route wins most picks but others still get tried', () {
|
||||
final strong = _route([1], success: 20, failure: 1);
|
||||
final weak = _route([2], success: 1, failure: 10);
|
||||
final unknown = _route([3]);
|
||||
final counts = _tally([strong, weak, unknown]);
|
||||
expect(counts[strong.pathBytes]!, greaterThan(1700));
|
||||
// Exploration: an untested route is still tried now and then.
|
||||
expect(counts[unknown.pathBytes]!, greaterThan(20));
|
||||
expect(counts[weak.pathBytes]!, lessThan(counts[unknown.pathBytes]!));
|
||||
});
|
||||
});
|
||||
|
||||
group('context', () {
|
||||
test('a route whose first hop is heard beats an equal one that is not', () {
|
||||
final viaA = _route([0xA0, 0x10], success: 3, failure: 1);
|
||||
final viaB = _route([0xB0, 0x10], success: 3, failure: 1);
|
||||
final counts = _tally([viaA, viaB], context: _hearing({0xA0}));
|
||||
expect(counts[viaA.pathBytes]!, greaterThan(1300));
|
||||
});
|
||||
|
||||
test('direct is preferred when the contact was heard directly', () {
|
||||
final direct = _route([], success: 3, failure: 1);
|
||||
final relayed = _route([0xA0], success: 3, failure: 1);
|
||||
final heard = _tally([
|
||||
direct,
|
||||
relayed,
|
||||
], context: _hearing({0xA0}, contactDirect: true));
|
||||
final notHeard = _tally([direct, relayed], context: _hearing({0xA0}));
|
||||
expect(
|
||||
heard[direct.pathBytes]!,
|
||||
greaterThan(notHeard[direct.pathBytes]!),
|
||||
);
|
||||
expect(notHeard[relayed.pathBytes]!, greaterThan(1000));
|
||||
});
|
||||
|
||||
test('with nothing heard, context changes nothing', () {
|
||||
final route = _route([0xA0], success: 1);
|
||||
expect(routeContextFactor(route, RouteContext.unknown), 1.0);
|
||||
});
|
||||
});
|
||||
|
||||
// A tiny simulated mesh: each route delivers with a fixed probability.
|
||||
// Each message gets up to [maxRetries] attempts, the last one a flood.
|
||||
group('simulation', () {
|
||||
late PathHistoryService svc;
|
||||
late DateTime clock;
|
||||
const contact =
|
||||
'00000000000000000000000000000000000000000000000000000000000000aa';
|
||||
const maxRetries = 4;
|
||||
|
||||
setUp(() async {
|
||||
clock = _now;
|
||||
svc = PathHistoryService(
|
||||
FakeStorageService(),
|
||||
random: math.Random(1),
|
||||
clock: () => clock,
|
||||
);
|
||||
svc.getRecentPaths(contact);
|
||||
await Future<void>.delayed(Duration.zero);
|
||||
});
|
||||
|
||||
void seed(List<int> bytes) => svc.recordPathAttempt(
|
||||
contact,
|
||||
PathSelection(pathBytes: bytes, hopCount: bytes.length, useFlood: false),
|
||||
);
|
||||
|
||||
/// Sends [messages] messages; returns the average number of route
|
||||
/// attempts before delivery (flood counts as one more).
|
||||
double run(
|
||||
int messages,
|
||||
double Function(List<int> bytes) deliveryRate, {
|
||||
RouteContext context = RouteContext.unknown,
|
||||
math.Random? rng,
|
||||
}) {
|
||||
final random = rng ?? math.Random(99);
|
||||
var attempts = 0;
|
||||
for (var m = 0; m < messages; m++) {
|
||||
clock = clock.add(const Duration(minutes: 10));
|
||||
final used = <PathSelection>[];
|
||||
for (var attempt = 0; attempt < maxRetries; attempt++) {
|
||||
attempts++;
|
||||
final pick = svc.selectPathForAttempt(
|
||||
contact,
|
||||
attemptIndex: attempt,
|
||||
maxRetries: maxRetries,
|
||||
recentSelections: used,
|
||||
context: context,
|
||||
);
|
||||
if (pick.useFlood) break; // flood always gets through here
|
||||
final ok = random.nextDouble() < deliveryRate(pick.pathBytes);
|
||||
svc.recordPathResult(contact, pick, success: ok);
|
||||
if (ok) break;
|
||||
used.add(pick);
|
||||
}
|
||||
}
|
||||
return attempts / messages;
|
||||
}
|
||||
|
||||
test('settles on the reliable route', () {
|
||||
seed([0x01]);
|
||||
seed([0x02]);
|
||||
seed([0x03]);
|
||||
final rates = {0x01: 0.95, 0x02: 0.5, 0x03: 0.1};
|
||||
run(100, (b) => rates[b.first]!); // learn
|
||||
final avg = run(200, (b) => rates[b.first]!);
|
||||
expect(avg, lessThan(1.25));
|
||||
});
|
||||
|
||||
test('moves off a route that stops working', () {
|
||||
seed([0x01]);
|
||||
seed([0x02]);
|
||||
var rates = {0x01: 0.95, 0x02: 0.8};
|
||||
run(100, (b) => rates[b.first]!);
|
||||
// The best repeater goes offline.
|
||||
rates = {0x01: 0.0, 0x02: 0.8};
|
||||
run(10, (b) => rates[b.first]!); // a few messages to notice
|
||||
final avg = run(100, (b) => rates[b.first]!);
|
||||
expect(avg, lessThan(1.5));
|
||||
});
|
||||
|
||||
test('home and work routes follow what the radio hears', () {
|
||||
seed([0xA0, 0x10]); // via the home repeater
|
||||
seed([0xB0, 0x10]); // via the work repeater
|
||||
double homeRates(List<int> b) => b.first == 0xA0 ? 0.9 : 0.05;
|
||||
double workRates(List<int> b) => b.first == 0xB0 ? 0.9 : 0.05;
|
||||
|
||||
run(60, homeRates, context: _hearing({0xA0}));
|
||||
final atWork = run(60, workRates, context: _hearing({0xB0}));
|
||||
final backHome = run(60, homeRates, context: _hearing({0xA0}));
|
||||
expect(atWork, lessThan(1.6));
|
||||
expect(backHome, lessThan(1.6));
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user