fun removeFlower(num: Float) {
val currentList = flowersLiveData.value
val updatedList = initialFlowerList.toMutableList()
updatedList.forEachIndexed{index, name ->
Log.d(TAG, "найдем index="+index.toString());
val q1=updatedList[index].lfreq.size/2-1
for (fr in 0..q1)
{
if (updatedList[index].lfreq[fr]<num && updatedList[index].lfreq[fr+1]>num)
break
else
if(fr==q1)
updatedList.removeAt(index)
}
}
flowersLiveData.postValue(updatedList)
}