What status are you in? If you stay in THAT H1 even after not working, technically you are out of status, but practically, USCIS won't know unless company notification. So if you are willing to take the risk, you can work using the existing I-797 approval until I-797 expires.
If you changed status or transfer after that job, USCIS knows you didn't work for that employer for a year so that I-797 is invalid (due to failing to maintain H1 requirements), and the employer needs to file a new I-129 to get a new H1 approval.
If you changed status or transfer after that job, USCIS knows you didn't work for that employer for a year so that I-797 is invalid (due to failing to maintain H1 requirements), and the employer needs to file a new I-129 to get a new H1 approval.