Bimba.git

ref: 65df18cd9983af2f0dc626bfe4dedc343eb470dc

app/src/main/java/ml/adamsprogs/bimba/models/suggestions/EmptySuggestion.kt


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package ml.adamsprogs.bimba.models.suggestions

import android.content.Context
import ml.adamsprogs.bimba.R

class EmptySuggestion : GtfsSuggestion("Empty") {
    override fun equals(other: Any?): Boolean {
        return other != null && other is EmptySuggestion
    }

    override fun getIcon(): Int {
        return R.drawable.ic_error_outline
    }

    override fun getColour(): Int {
        return 0xffffff
    }

    override fun getBgColour(): Int {
        return 0x000000
    }

    override fun getBody(context: Context): String {
        return context.getString(R.string.nothing_found)
    }

    override fun compareTo(other: GtfsSuggestion): Int {
        return if (other is EmptySuggestion)
            0
        else
            -1
    }

    override fun hashCode(): Int {
        return name.hashCode()
    }
}