Skip to content
Snippets Groups Projects
  • Lynx Linden's avatar
    1c591c06
    EXT-2232: Arghhh! Code Duplication == Bugs. · 1c591c06
    Lynx Linden authored
    Apparently, pre-login notifications use LLAlertDialog, but post-login
    notifications use LLToastAlertPanel. The latter is basically a copy
    and paste of the former, with some local modifications. However, the
    person who copy/pasted the code did not initialize the URLLoader
    callback, so all notifications that tried to open a web page on a
    button click after login were failing.
    
    I've added comments that this code should be refactored, preferably as
    a subclass of LLAlertDialog. In the meantime, I've tried to clean it
    up a bit by not duplicating the nested URLLoader class (which would've
    required further duplication to reimplement the exact same loader class
    that LLAlertDialog uses). This let me then initialize the URLLoader
    callback for LLToastAlertPanel, to fix this specific bug.
    
    Again... arghhh!!
    1c591c06
    History
    EXT-2232: Arghhh! Code Duplication == Bugs.
    Lynx Linden authored
    Apparently, pre-login notifications use LLAlertDialog, but post-login
    notifications use LLToastAlertPanel. The latter is basically a copy
    and paste of the former, with some local modifications. However, the
    person who copy/pasted the code did not initialize the URLLoader
    callback, so all notifications that tried to open a web page on a
    button click after login were failing.
    
    I've added comments that this code should be refactored, preferably as
    a subclass of LLAlertDialog. In the meantime, I've tried to clean it
    up a bit by not duplicating the nested URLLoader class (which would've
    required further duplication to reimplement the exact same loader class
    that LLAlertDialog uses). This let me then initialize the URLLoader
    callback for LLToastAlertPanel, to fix this specific bug.
    
    Again... arghhh!!
Code owners
Assign users and groups as approvers for specific file changes. Learn more.