Lots of style improvements
This commit is contained in:
@@ -28,11 +28,11 @@ module Wince
|
||||
|
||||
businesses.map do |business|
|
||||
name = business["name"].as_s? || ""
|
||||
rating = business["rating"].as_f.to_s
|
||||
hours = business["is_closed"].as_bool.to_s
|
||||
website = business["url"].as_s? || ""
|
||||
rating = business["rating"].as_f32
|
||||
open = business["is_closed"].as_bool
|
||||
distance = business["distance"].as_f32
|
||||
|
||||
BusinessRow.new(name, rating, hours, website)
|
||||
BusinessRow.new(name, rating, open, distance)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,10 +44,15 @@ module Wince
|
||||
search = SEARCH_ENTRY.buffer.text
|
||||
location = LOCATION_ENTRY.buffer.text
|
||||
|
||||
if !search || !location
|
||||
if search.blank? || location.blank?
|
||||
SCROLL_VIEW.visible = false
|
||||
POWERD_BY_TEXT.visible = true
|
||||
return
|
||||
end
|
||||
|
||||
SCROLL_VIEW.visible = true
|
||||
POWERD_BY_TEXT.visible = false
|
||||
|
||||
response = Yelp.search_businesses(search, location)
|
||||
|
||||
if response.status_code != 200
|
||||
|
||||
Reference in New Issue
Block a user