comparison weather.tcl @ 691:e1aba44b8c7b

weather: Show limit of matches.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 22 Jun 2023 13:51:49 +0300
parents 8a6cca58e853
children
comparison
equal deleted inserted replaced
690:8a6cca58e853 691:e1aba44b8c7b
325 lappend result [weather_get_str $uvalue $weather_msg_list_station] 325 lappend result [weather_get_str $uvalue $weather_msg_list_station]
326 } 326 }
327 } 327 }
328 328
329 if {[llength $result] > 0} { 329 if {[llength $result] > 0} {
330 set res [join [lrange $result 0 10] " ; "] 330 set max_matches 10
331 if {[llength $result] > 10} { 331 set res [join [lrange $result 0 $max_matches] " ; "]
332 append res [weather_qm "stations_limit"] 332 if {[llength $result] > $max_matches} {
333 append res [weather_qm "stations_limit" $max_matches]
333 } 334 }
334 } else { 335 } else {
335 set res [weather_qm "stations_no_matches"] 336 set res [weather_qm "stations_no_matches"]
336 } 337 }
337 338