Fix instant help received not being remembered
This commit is contained in:
@@ -838,7 +838,10 @@ static void give_help(short help1,short help2,cDialog* parent) {
|
||||
}
|
||||
if(!get_bool_pref("ShowInstantHelp", true) && !help_forced)
|
||||
return;
|
||||
if(get_iarray_pref_contains("ReceivedHelp", help1))
|
||||
return;
|
||||
append_iarray_pref("ReceivedHelp", help1);
|
||||
append_iarray_pref("ReceivedHelp", help2);
|
||||
str1 = get_str("help",help1);
|
||||
if(help2 > 0)
|
||||
str2 = get_str("help",help2);
|
||||
|
@@ -21,6 +21,11 @@ int get_int_pref(std::string keypath, int fallback = 0);
|
||||
void append_iarray_pref(std::string keypath, int value);
|
||||
std::vector<int> get_iarray_pref(std::string keypath);
|
||||
|
||||
inline bool get_iarray_pref_contains(std::string keypath, int value) {
|
||||
const std::vector<int>& val = get_iarray_pref(keypath);
|
||||
return std::find(val.begin(), val.end(), value) != val.end();
|
||||
}
|
||||
|
||||
void clear_pref(std::string keypath);
|
||||
bool sync_prefs();
|
||||
|
||||
|
Reference in New Issue
Block a user