Optimize sxmo_modemtext contact listing
When you number of conversation start to grow, it rapidly take some seconds for the menu to open itself. The [ -d "folder" ] test really is uneficient. This simplify this part as we now ask sxmo_contacts to only list texted contacts.
This commit is contained in:
parent
823ad95477
commit
e444553ae4
2 changed files with 26 additions and 14 deletions
|
@ -89,10 +89,7 @@ readtextmenu() {
|
|||
# E.g. only display logfiles for directories that exist and join w contact name
|
||||
ENTRIES="$(
|
||||
printf %b "$icon_cls Close Menu\n$icon_edt Send a Text\n";
|
||||
sxmo_contacts.sh | while read -r CONTACT; do
|
||||
[ -d "$LOGDIR"/"$(printf %b "$CONTACT" | cut -d: -f1)" ] || continue
|
||||
printf %b "$CONTACT" | xargs -IL echo "L logfile"
|
||||
done
|
||||
sxmo_contacts.sh --texted | xargs -IL echo "L logfile"
|
||||
)"
|
||||
PICKED="$(printf %b "$ENTRIES" | dmenu -p Texts -c -l 10 -i)" || exit
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue