On the main screen of the application should be tips like in Google now. Tips are issued based on various conditions.

How and where to check these conditions is better? When you start to make checks on all conditions?

if(userStupid) new Card("Вы очень умный"); if(userVeryStupid) new Card("Вам следует написать книгу"); 

I think it's a little silly to do such checks every time.

How would you implement?

    1 answer 1

    Can make a flag that changes if conditions have changed? Then you will only need to check it. A flag to change with the help of events. In addition, the flag can be simultaneously a label where what has changed. those. for example, the value 0 is all the same. value 1 - condition 1 has changed. Value 10 - condition 2 has changed. And so on. If the first two conditions have changed - then the value 11 will be obtained.