[FL-2828] Dolphin score update take 2 (#1929)
* Move DolphinDeedNfcRead * Move DolphinDeedNfcReadSuccess * Move DolphinDeedNfcSave * Move DolphinDeedNfcDetectReader * Move DolphinDeedNfcEmulate * Count DolphinDeedNfcEmulate when launched from file browser * Implement most of the score accounting for NFC * Fully update Nfc icounter handling * Move DolphinDeedSubGhzFrequencyAnalyzer * Update the rest of icounter in SubGHz * Adjust SubGHz icounter handling * Adjust LFRFID icounter handling * Adjust Infrared icounter handling * Don't count renaming RFID tags as saving * Don't count renaming SubGHz signals as saving * Don't count renaming NFC tags as saving * Adjust iButton icounter handling * Minor code refactoring * Correct formatting * Account for emulating iButton keys from file manager/rpc Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		@@ -4,6 +4,7 @@
 | 
			
		||||
#include "../helpers/subghz_custom_event.h"
 | 
			
		||||
#include <lib/subghz/protocols/raw.h>
 | 
			
		||||
#include <gui/modules/validators.h>
 | 
			
		||||
#include <dolphin/dolphin.h>
 | 
			
		||||
 | 
			
		||||
#define MAX_TEXT_INPUT_LEN 22
 | 
			
		||||
 | 
			
		||||
@@ -131,6 +132,17 @@ bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) {
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveSuccess);
 | 
			
		||||
                if(scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneSavedMenu)) {
 | 
			
		||||
                    // Nothing, do not count editing as saving
 | 
			
		||||
                } else if(scene_manager_has_previous_scene(
 | 
			
		||||
                              subghz->scene_manager, SubGhzSceneMoreRAW)) {
 | 
			
		||||
                    // Ditto, for RAW signals
 | 
			
		||||
                } else if(scene_manager_has_previous_scene(
 | 
			
		||||
                              subghz->scene_manager, SubGhzSceneSetType)) {
 | 
			
		||||
                    DOLPHIN_DEED(DolphinDeedSubGhzAddManually);
 | 
			
		||||
                } else {
 | 
			
		||||
                    DOLPHIN_DEED(DolphinDeedSubGhzSave);
 | 
			
		||||
                }
 | 
			
		||||
                return true;
 | 
			
		||||
            } else {
 | 
			
		||||
                furi_string_set(subghz->error_str, "No name file");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user