| .. | .. |
|---|
| 83 | 83 | final List<dynamic> jsonList = jsonDecode(jsonStr) as List<dynamic>; |
|---|
| 84 | 84 | final allMessages = jsonList |
|---|
| 85 | 85 | .map((j) => _messageFromJson(j as Map<String, dynamic>)) |
|---|
| 86 | | - .where((m) => !m.isEmptyVoice) // Filter out voice msgs with no content |
|---|
| 86 | + .where((m) => !m.isEmptyVoice && !m.isEmptyText) |
|---|
| 87 | 87 | .toList(); |
|---|
| 88 | 88 | |
|---|
| 89 | 89 | // Paginate from the end (newest messages first in storage) |
|---|
| .. | .. |
|---|
| 107 | 107 | final List<dynamic> jsonList = jsonDecode(jsonStr) as List<dynamic>; |
|---|
| 108 | 108 | return jsonList |
|---|
| 109 | 109 | .map((j) => _messageFromJson(j as Map<String, dynamic>)) |
|---|
| 110 | | - .where((m) => !m.isEmptyVoice) |
|---|
| 110 | + .where((m) => !m.isEmptyVoice && !m.isEmptyText) |
|---|
| 111 | 111 | .toList(); |
|---|
| 112 | 112 | } catch (e) { |
|---|
| 113 | 113 | return []; |
|---|