treehouses / remote

⚡ control Raspberry Pi from Android Device through Bluetooth ⚡
https://play.google.com/store/apps/details?id=io.treehouses.remote
GNU Affero General Public License v3.0
62 stars 27 forks source link

tor: refactor mvvm (fixes #1784) #1786

Closed BryanGazali closed 3 years ago

BryanGazali commented 3 years ago

fixes #1784

Description

refactor tortab to mvvm format

currently there's a null point exception error in TorTabViewModel line 136. The problem seems to be with the line "portsNameList.value?.add("All")".

BryanGazali commented 3 years ago

update on null pointer crash issue. I believe where the error was actually taking place with the code "portsNameList.value!!.size > 1", because portsNameList.value!!.size was returning a null value. This also means that "portsNameList.value?.add(ports[i])" wasn't properly adding values to portsNameList. I believe this is because portsNameList was not given an empty array list via ArrayList(), so that should be done somewhere in onCreateView.

rrijal53 commented 3 years ago

Tor is stopped but it is still showing stoping tor ..

Screen Shot 2021-04-24 at 08 08 48

device-2021-04-24-080855